PHP中捕获超时事件的方法实例

上传:l11828 浏览: 12 推荐: 0 文件:PDF 大小:24.91KB 上传时间:2020-12-22 23:05:58 版权申诉
set_error_handler()不能捕获致命错误(具体错误类型见手册)。 所以需要如下方法: <?php ini_set ( 'max_execution_time', 1 ); function shutdown() { $a = error_get_last (); print_r ( $a ); } register_shutdown_function ( 'shutdown' ); while ( true ) { } 注意:sleep()停顿时间不算在max_execution_time中。 您可能感兴趣的文章:Li
上传资源
用户评论