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)].
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!