Home  >  Article  >  Backend Development  >  在PHP中error_reporting这个函数有什么作用?该如何处理

在PHP中error_reporting这个函数有什么作用?该如何处理

WBOY
WBOYOriginal
2016-06-13 13:34:011313browse

在PHP中error_reporting这个函数有什么作用?
在PHP中error_reporting这个函数有什么作用?

------解决方案--------------------
设置报错级别
http://docs.php.net/manual/zh/function.error-reporting.php

------解决方案--------------------
error_reporting() 设置 PHP 的报错级别并返回当前级别。

语法
error_reporting(report_level)

//禁用错误报告
error_reporting(0);

//报告运行时错误
error_reporting(E_ERROR | E_WARNING | E_PARSE);

//报告所有错误
error_reporting(E_ALL);
?>
------解决方案--------------------
error_reporting() 设置 PHP 的报错级别并返回当前级别。
------解决方案--------------------
顶起

探讨

error_reporting() 设置 PHP 的报错级别并返回当前级别。

语法
error_reporting(report_level)

//禁用错误报告
error_reporting(0);

//报告运行时错误
error_reporting(E_ERROR | E_WARNING | E_PARSE);

//报告所有错误
error_re……
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