Home  >  Article  >  Backend Development  >  How to remove notice prompt in php

How to remove notice prompt in php

PHPz
PHPzOriginal
2020-08-18 13:17:053092browse

How to remove the notice prompt in php: You can use the error_reporting() function to achieve this. The error_reporting() function is used to set the error reporting level of the current script, such as: [error_reporting(E_ALL ^ ​​E_NOTICE)].

How to remove notice prompt in php

Method 1:

(Recommended tutorial: php graphic tutorial)

in php Modify error_reporting

in the .ini file to:

error_reporting = E_ALL & ~E_NOTICE

Method 2:

(Learning video recommendation: php video tutorial)

Add the following code to the script:

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

The above is the detailed content of How to remove notice prompt in php. For more information, please follow other related articles on the PHP Chinese website!

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