开发者

PHP Max Exection Timeout Notification

Is it possible to get Max Execution timeout notification so that i can use code clean up operations before the php script stops running?

Basically, i am trying to create a script that can do some changes/modificatio开发者_C百科ns to my database which has huge data pile. Also, this php script execution can be paused/resumed using a filelock.


You can either use set_error_handler() or register_shutdown_function().

Edit: See also: max execution time error handling


If you set 0 to set_time_limit, it will never stop :)

You can increase the limit time inside your code using:

set_time_limit(300); //time in seconds
ini_set('max_execution_time', 300); //300 seconds = 5 minutes

or

changing the max_execution_time parameter inside your php.ini.

The default time is 30 seconds.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜