Nginx服务器中414错误和504错误的配置解决方法

2019-10-17 19:53:54丽君

命令行运行php的话,可以使用这段代码

$real_execution_time_limit = 60; //时间限制

if (pcntl_fork())
{
// some long time code which should be
// terminated after $real_execution_time_limit seconds passed if it's not
// finished by that time
}
else
{
sleep($real_execution_time_limit);
posix_kill(posix_getppid(), SIGKILL);
}