Home >Backend Development >PHP Tutorial >PHP如何关闭notice级别的错误提示

PHP如何关闭notice级别的错误提示

WBOY
WBOYOriginal
2016-06-23 13:42:471010browse

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);


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn