我在 PHP (v5.4.13) 中有一个奇怪的时间限制 mgmt 行为。
我设置max_execution_time
为30
in php.ini
,在我的脚本中我调用:
set_time_limit(1000) ;
并确保它已设置,我调用:
error_log (ini_get('max_execution_time'));
返回1000。但是现在如果我用
exec("foobar.exe") ;
(一个很长的程序,运行大约需要5分钟),脚本停止并在日志中出现错误:
PHP Fatal error: Maximum execution time of 120 seconds exceeded
我的问题是为什么这个脚本在 120 秒后停止?有任何想法吗?