Php prompts Notice: Useofundefinedconstantname-assumed

Source: Internet
Author: User
We know that there are two methods for php to write variables in the array. the prompt is that you have written a [name], so there will be Notice: Useofundefinedconstantname.

We know that there are two methods for php to write variables in the array. we will see this prompt that you have written a [name], so there will be a Notice: Use of undefined constant name-assumed name prompt, the solution is described below.

Close the PHP prompt and search for php. ini:

Change error_reporting = E_ALL to error_reporting = E_ALL &~ E_NOTICE

Another way to do this is to add

Error_reporting (0); although it is difficult to solve the problem, if you do not have the permission to modify php. ini, you can refer to my method to solve the problem. source file:

  1. $ Room [name] = $ Name;
  2. $ Room [retailrate] = $ RetailRate;

Change

  1. $ Room ['name'] = $ name;
  2. $ Room ['retailrate'] = $ retailrate;

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.