当前位置:Gxlcms > PHP教程 > php怎么关闭debug模式

php怎么关闭debug模式

时间:2021-07-01 10:21:17 帮助过:67人阅读

php关闭debug模式的方法:直接在php脚本中添加代码【error_reporting(0);】即可。如果我们要报告除E_NOTICE之外的错误,可以添加代码【error_reporting(E_ALL & ~E_NOTICE);】。

本文操作环境:windows10系统、php 7.3、thinkpad t480电脑。

具体操作如下:

关闭错误报告

 error_reporting(0);

报告 runtime 错误

 error_reporting(E_ERROR | E_WARNING | E_PARSE);

报告所有错误

 error_reporting(E_ALL);

等同 error_reporting(E_ALL);

 ini_set("error_reporting", E_ALL);

报告 E_NOTICE 之外的所有错误

 error_reporting(E_ALL & ~E_NOTICE);

相关推荐:php教程

以上就是php怎么关闭debug模式的详细内容,更多请关注gxlcms其它相关文章!

人气教程排行