php关闭notice警告的方法:1、在php.ini文件中修改内容为“error_reporting=e_all & ~e_notice”;2、在禁止notice错误提示的页面中加入“error_reporting(e_all...)”。
本文操作环境:windows7系统、php7.1、dell g3电脑。
php关闭notice级别的错误提示
1、在php.ini文件中改动error_reporting
改为:
error_reporting=e_all & ~e_notice
2、如果你不能操作php.ini文件,你可以使用如下方法
在你想禁止notice错误提示的页面中加入如下代码:
/* report all errors except e_notice */error_reporting(e_all^e_notice);
推荐:《php视频教程》
以上就是php怎么关闭notice警告的详细内容。
