php.ini中配置php错误报告级别

抬出baidu,直接复制、粘贴php notice:,这样搜索的结果,一般有两种情况:
一、直接来一句:error_reporting=E_ALL&~E_NOTICE,搞得你不知道什么意思?!
二、

1.在php.ini文件中改动error_reporting

    改为:  
    error_reporting=E_ALL&~E_NOTICE

如果你不能操作php.ini文件,你可以用下面的方法来实现

2.在你想禁止notice错误提示的页面中加入下面的代码

/* Report all errors except E_NOTICE */
error_reporting(E_ALL ^ E_NOTICE);

希望上面的代码能解决你的问题。

 

这个还好一些,让你知道怎么搞!打开php.ini,ctrl+f找到error_reporting,把上面的ctrl+v过来,浏览自己的网页,就不显示php notice了。

posted @ 2012-08-27 16:26  Panzhibin  阅读(276)  评论(0编辑  收藏  举报