PHP Hints notice:undefined Variable Solution

Source: Internet
Author: User

Keyword Description: method to resolve Modify E_all php.ini error_reporting &

Notice:undefined Variable:email in D:\PHP5\ENOTE\ADDNOTE. PHP on line 9

Notice:undefined Variable:subject in D:\PHP5\ENOTE\ADDNOTE. PHP on line 9

Notice:undefined variable:comment in D:\PHP5\ENOTE\ADDNOTE. PHP on line 9

........

Originally PHP does not need to define variables, but what should happen in this case?

Just find php.ini in C:\WINDOWS.

302 lines of error_reporting = E_all in php.ini

Modified into

error_reporting = e_all & ~e_notice restart apache2.2.

Workaround: Modify PHP.ini

Will: error_reporting = E_all

Modified to: error_reporting = E_all & ~e_notice

If any errors do not want to show, directly modify:

Display_errors = Off

If you do not have php.ini permission to modify, you can add to the head of PHP

Ini_set ("error_reporting", "E_all & ~e_notice");

Can




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.