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

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

WBOY
Release: 2016-06-23 13:42:47
Original
1013 people have browsed it

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


source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template