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模式的详细内容!
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did52757
php怎么关闭debug模式
阅读:39次