您可以通过在
PHP代码中设置set_time_limit来设置它(设置为0表示无限制)
set_time_limit(0);
或者直接在php.ini中修改max_execution_time的值
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 120
或者用ini_set()更改它
ini_set('max_execution_time', 120); //120 seconds
但请注意,对于第3个选项:
max_execution_time
You can not change this setting with ini_set() when running in safe
mode. The only workaround is to turn off safe mode or by changing the
time limit in the php.ini.