Article From:


  Notice:NoticePHP Tips rather than errors,PHPIt can be used directly without declaring variables beforehand, but there are hints for undeclared variables. When the website is officially launched, the prompt will be turned off.

Ways to turn off PHP prompts


error_reporting = E_ALL

changed to:

error_reporting = E_ALL & ~E_NOTICE

There is another way not to do that.

Add on each file header


It’s not easy, but it can solve problems.”

<span style="font-size:18px;">
//disable error reporting
//Report all errors except warnings
error_reporting(E_ALL & ~E_NOTICE);
//Reporting runtime errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);
//Report all errors


Link of this Article: Notice appears in PHP running

Leave a Reply

Your email address will not be published. Required fields are marked *