Home  >  Article  >  php教程  >  PHP 自定义错误拦截

PHP 自定义错误拦截

PHP中文网
PHP中文网Original
2016-05-25 17:00:461368browse

PHP 自定义错误拦截

USER_ERROR 
"; echo "PHP " . PHP_VERSION . " (" . PHP_OS . ")
"; exit(1); break; case E_USER_WARNING: echo "USER_WARNING
"; break; case E_USER_NOTICE: echo "USER_NOTICE
"; break; case E_NOTICE: echo "NOTICE
"; break; case E_WARNING: echo "WARNING
"; break; case E_RECOVERABLE_ERROR: echo "RECOVERABLE_ERROR
"; break; case E_ALL: echo "ALL
"; break; default: echo "Unknown Error Type
"; break; } echo "Error level: [$errno]
"; echo "Error message: $errstr
"; echo "Error line: [$errline]
"; echo "Error where: $errfile
"; } set_error_handler('error_handler'); test(a); ?>

 以上就是PHP 自定义错误拦截的内容,更多相关内容请关注PHP中文网(m.sbmmt.com)! 


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