Detailed graphic explanation of common solutions to Notice errors in PHP

墨辰丷
Release: 2023-03-27 16:16:01
Original
1850 people have browsed it

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 similarNotice: 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:

Founderror_reporting=E_ALL

Modified toerror_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 usePHPto output Chinese JSON string_json

Detailed explanation of php observer mode application scenario examples_php skills

##PHPWatermark class, supports adding pictures, Implementation of text and filled color areas_php example

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!