Home > Backend Development > PHP Tutorial > Common solutions to NOTICE errors for PHP newbies_PHP Tutorial

Common solutions to NOTICE errors for PHP newbies_PHP Tutorial

WBOY
Release: 2016-07-21 15:22:20
Original
826 people have browsed it

I just learned PHP, and soon I usually read the manual and a book called PHP and mysql web development.

I have been editing the message board recently and I just encountered a problem.

In the page, there are many similar Notices: Use of undefined constant title - assumed 'title' in D:wampwwwphpmysqlwebbbslist.php on line 17

The page is ugly and confusing. I use wamp integration package.

After searching on Baidu, it seems that many friends also have this situation.

Notice means that a variable that has not been declared is used, but the program will not affect its use. No wonder it still works, it just looks unsightly.

There are 4 solutions:

1: Initialize above

2: Open the php.ini file

Modify the configuration file

error_reporting settings:

Find error_reporting=E_ALL

and modify it to error_reporting=E_ALL & ~E_NOTICE

3: Use include to write error_reporting(E_ALL & ~E_NOTICE);/ /This is what Tiantian does, because he is a lazy person and is afraid to open this and that, hehe. . . . .

4: Add error_reporting(0) directly at the top of the file;

I am ready to work on PHP, but I encountered this strange problem, and we have Baidu, Shenma problem, Baidu , all solved.

Attention, newbie friends, when the page reports any errors, check the code to see if there are any missing semicolons or brackets. I made those careless mistakes just now, and I feel ashamed.

My path to PHP is destined to be difficult, but I will not give up and must do it well. come on.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/324676.htmlTechArticleI just learned PHP. Soon, I usually read manuals and a book called PHP and mysql web development. I've been working on the message board recently, and I just encountered a problem. On the page, there are many similar Notice: Use of unde...
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template