Pri*_*jan 196 php ini execution-time
我想在php中增加最长执行时间,而不是通过更改php.ini文件.
我想从我的php文件中增加它.
这可能吗?
Jam*_*les 426
ini_set('max_execution_time', '300'); //300 seconds = 5 minutes
ini_set('max_execution_time', '0'); // for infinite time of execution
Run Code Online (Sandbox Code Playgroud)
将它放在PHP脚本的顶部,让脚本松散!
The*_*ook 56
使用PHP函数
void set_time_limit ( int $seconds )
Run Code Online (Sandbox Code Playgroud)
最长执行时间,以秒为单位.如果设置为零,则不会施加时间限制.
当PHP以安全模式运行时,此功能无效.除了关闭安全模式或更改php.ini中的时间限制外,没有其他解决方法.