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.