Home>Article>Backend Development> How to block notice error in php
The solution to shielding notice errors in PHP is:
Errors in PHP are divided into three levels: notice, warning, and error.
The PHP integrated in Wampserver prompts all levels of errors by default
You can change the error prompt level by modifying the PHP configuration file
Found PHP configuration file, by entering phpinfo() in the PHP file;
will output a page:
The directory path in the Loaded Configuration File in the record page
Find the php.ini file through the path.
2. Find error_reporting and add ~E_NOTICE
after ~E_ALL and then restart the server That’s it. In this way, notice errors can be blocked
Recommended tutorial: "php tutorial"
The above is the detailed content of How to block notice error in php. For more information, please follow other related articles on the PHP Chinese website!