Tips on how to hide mysqli

Source: Internet
Author: User
The PHP version used by the local wampserver is 5.5.12, but the version of the company project is 5.4, and then it has been error-

How do I stop prompting this without changing the PHP version?
I want to switch 5.4 version of PHP, but always unsuccessful, wampserver start up, and now consider there is no way to hide this hint.

Reply content:

The PHP version used by the local wampserver is 5.5.12, but the version of the company project is 5.4, and then it has been error-

How do I stop prompting this without changing the PHP version?
I want to switch 5.4 version of PHP, but always unsuccessful, wampserver start up, and now consider there is no way to hide this hint.

This is a PHP minimum level error hint, which means that mysql_connect() 被废除 you can precede the code with an @ error suppressor, or the code addserror_reporting(0)

Solve:

@mysql_connect()

Look at this, I am also a copy of the link because do not PHP you try to

http://www.ttlsa.com/php/deprecated-mysql-connect/   

PHP's version is too high, the mysql_connect () function will be removed in the future and replaced with mysqli.

Tell the people you're developing. The MySQL-related modules in the PHP project are all changed to mysqli.

As in this line:

 $link = mysqli_connect('localhost', 'user', 'password', 'dbname');

Similar to:

1、mysql_connect 改为mysqli_connect2、mysql_query 改为mysqli_query3、mysql_close 改为 mysqli_close
  • 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.