Home > php教程 > php手册 > PHP捕捉致命错误

PHP捕捉致命错误

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 19:32:10
Original
1054 people have browsed it

就是捕捉致命错误啦~ 无 ?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();



Copy after login
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template