Home > Article > Backend Development > How to close notice in php
How to close notice in php: First use a text editor to open the php.ini configuration file; then modify the configuration [error_reporting=E_ALL & ~E_NOTICE].
The method is as follows:
(Recommended tutorial: php video tutorial)
1. Change error_reporting in the php.ini file to:
error_reporting=E_ALL & ~E_NOTICE
2. If you cannot operate the php.ini file, you can use the following method
when you want to ban the notice Add the following code to the error page:
error_reporting(E_ALL^E_NOTICE);
or
error_reporting(0);
Related recommendations: php training
The above is the detailed content of How to close notice in php. For more information, please follow other related articles on the PHP Chinese website!