Home  >  Article  >  php教程  >  php 普通错误和致命错误捕获及处理

php 普通错误和致命错误捕获及处理

WBOY
WBOYOriginal
2016-06-06 19:33:021007browse

无详细内容 无 ?php//禁止错误输出error_reporting(0);//设置错误处理器set_error_handler('errorHandler');register_shutdown_function('fatalErrorHandler');class Test{public function index(){//这里发生一个警告错误,出发errorHandler echo $undefined

index();
	//发生致命错误,脚本停止运行触发 fatalErrorHandler 
	$test = new Tesdt();
	$test->index();
php 普通错误和致命错误捕获及处理
Statement:
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