就是捕捉致命错误啦~ 无 ?phperror_reporting(0);function _rare_shutdown_catch_error(){ $_error=error_get_last(); if($_error in_array($_error['type'],array(1,4,16,64,256,4096,E_ALL))){ echo '致命错误:'.$_error['message'].'/br'; echo '文件:'.$_
就是捕捉致命错误啦~
<?php
error_reporting(0);
function _rare_shutdown_catch_error(){
$_error=error_get_last();
if($_error && in_array($_error['type'],array(1,4,16,64,256,4096,E_ALL))){
echo '致命错误:'.$_error['message'].'</br>';
echo '文件:'.$_error['file'].'</br>';
echo '在第'.$_error['line'].'行</br>';
}
}
register_shutdown_function("_rare_shutdown_catch_error");
test();
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号