时间:2021-07-01 10:21:17 帮助过:48人阅读
所以需要如下方法:
<?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中。