Php multiple references Error

Source: Internet
Author: User
This problem has not been solved before. This problem occurs when php is upgraded to 5.4. php code {code ...} connect. php code {code ...} index. php code {code ...} next, the problem arises. If I am in index. connect. php, php error, prompt me ho... this problem has not been solved before. This problem occurs when php is upgraded to 5.4.

Code in config. php


  

Code in connect. php


  connect_error){    die('Connect Error:'.$mysqli->connect_error);}$mysqli->set_charset('utf8');?>

Code in index. php


  

Next, the problem arises.index.phpIntroduced inconnect.php, Php error, prompt mehost username password datebaseThese constants are not defined.
However


  

This is normal. How can this problem be solved?

Reply content:

This problem has not been solved before. This problem occurs when php is upgraded to 5.4.

Code in config. php


  

Code in connect. php


  connect_error){    die('Connect Error:'.$mysqli->connect_error);}$mysqli->set_charset('utf8');?>

Code in index. php


  

Next, the problem arises.index.phpIntroduced inconnect.php, Php error, prompt mehost username password datebaseThese constants are not defined.
However


  

This is normal. How can this problem be solved?

I think this should be helpful to you, and there is no code on the way home.
Http://m.111cn.net/art-42982.htm

Try changing the defined constant name to uppercase.

New mysqli (host, username, password, database );
New mysqli ($ host, $ username, $ password, $ database );
Do you understand?

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.