我在用
error_reporting(0);
error_reporting(E_NONE);
ini_set("display_errors", "off");
ini_set("display_errors", 0);但是错误仍然显示在我的页面上。
Warning: xxxxxxxxxxx发布于 2016-01-24 17:41:34
E_NONE。display_error,只有display_errors发布于 2016-01-24 18:16:38
在您的示例中,您得到了一个由warning..Which生成的E_WARNING..It,可能会因为一个失败的db脚本而引发connection..Execution,但是它可能仍然是一个问题。
http://php.net/manual/errorfunc.constants.php
如果是db连接,警告写入异常是一种好做法
http://php.net/manual/en/language.exceptions.php
如果要忽略警告,请尝试:
error_reporting(E_ALL ^ E_WARNING);但请不要使用error_reporting(0);
因为这些都是错误,所以您需要修复它们,并且脚本的执行将停止。
使用
error_reporting(E_ALL);
ini_set("display_errors", 1);发展中..。
https://stackoverflow.com/questions/34979111
复制相似问题