This article mainly introduces common solutions to Notice errors in PHP, which has a good reference value.
For beginners, you will definitely encounter different error prompts, such as: warning, fatal, etc. Among them, NOTICE error level is the lowest. On the page, there are many similar Notice: Use of undefined constant title - assumed 'title' in D:\wamp\www\phpmysqlweb\bbs\list.php on line 17 . Although it does not affect normal operation, it looks very uncomfortable. For users who do not know programming, they may feel very scared. So how to solve it? The reason is that the variables are not defined. Let’s take a look at the solutions I often use in programming!
1: Initialize above
2: Open the php.ini file
Modify the configuration file
error_reporting settings:
Found error_reporting=E_ALL
Modified to error_reporting=E_ALL & ~E_NOTICE
3 : Write error_reporting(E_ALL & ~E_NOTICE); to the head
4: Add error_reporting(0); directly to the top of the file
The above is the entire content of this article, I hope it will be helpful to everyone's study.
Related recommendations:
Teach you how to use PHP to output Chinese JSON string_json
Detailed explanation of php observer mode application scenario examples_php skills
The above is the detailed content of Detailed graphic explanation of common solutions to Notice errors in PHP. For more information, please follow other related articles on the PHP Chinese website!