PhpUndefinedvariable and Undefinedindex

Source: Internet
Author: User
Undefinedvariable and undefinedindex: if this problem occurs, the variable is undefined. we just need to add a verification code such as $ aisset ($ _ get [#39; aa #39;])? $ _ Get [... undefined variable and undefined index

$ A = isset ($ _ get ['A'])? $ _ Get ['A']: 'variable undefined ';

In this way, undefined variable and undefined index are not displayed for undefined Variables. We also provide methods to set errors and do not prompt in php ini or php.

Solution:

1) error_reporting settings: locate error_reporting = e_all

Change to error_reporting = e_all &~ E_notice

2) set register_globals: find register_globals = off.

Change to register_globals = on

Tutorial link:

Reprint at will ~ However, please keep the tutorial address★

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.