关闭错误我使用不要在我的页面
error_reporting(0);
error_reporting(E_NONE);
ini_set("display_errors", "off");
ini_set("display_errors", 0);
但错误依然在我的网页
Warning: xxxxxxxxxxx
关闭错误我使用不要在我的页面
error_reporting(0);
error_reporting(E_NONE);
ini_set("display_errors", "off");
ini_set("display_errors", 0);
但错误依然在我的网页
Warning: xxxxxxxxxxx
E_NONE
。display_error
,只有display_errors
在你的情况你正在通过E_WARNING..It产生warning..Which因为脚本的失败分贝connection..Execution可以抛出不会停止但它也许仍然是一个问题..
http://php.net/manual/errorfunc.constants.php
如果它是一个数据库连接警告书写异常是一个很好的做法
http://php.net/manual/en/language.exceptions.php如果您想忽略警告
尝试:
error_reporting(E_ALL^E_WARNING);
但请不要因为这些错误,你需要修复这些使用error_reporting(0);
,和脚本的执行将被在DEVE停止
使用
error_reporting(E_ALL);
ini_set("display_errors", 1);
lopment ..
一个更好的选择是解决和修复你所面对的错误,简单地忽略它们从来就不是一个好主意。 – Qirel
@Hasan检查手册中的示例: - http://php.net/manual/en/function.error-reporting.php –
已解决问题。感谢所有 – Hasan