How to hide mysqli tips-php Tutorial

Source: Internet
Author: User
The php version used by the local Wampserver is 5.5.12, but the company's project version is 5.4, and then the error is always reported -- {code...} without changing the php version, how can I not remind me of this? I want to switch to php 5.4, but it is always unsuccessful. wampserver cannot be started... the php version used by the local Wampserver is 5.5.12, but the company Project version is 5.4, and an error is reported all the time --

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in 

If you do not change the php version, how can you stop prompting this?
I want to switch to php 5.4, but it is always unsuccessful and wampserver cannot be started. now I want to figure out whether to hide this prompt.

Reply content:

The php version used by the local Wampserver is 5.5.12, but the company Project version is 5.4, and an error is reported all the time --

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in 

If you do not change the php version, how can you stop prompting this?
I want to switch to php 5.4, but it is always unsuccessful and wampserver cannot be started. now I want to figure out whether to hide this prompt.

This is a PHP lowest-level error prompt, that isMysql_connect () abolishedBefore the code@Error blocker or codeerror_reporting(0)

Solution:

@mysql_connect()

Look at this. I also copied the link because I don't use php. you can try it.

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

If the php version is too high, the mysql_connect () function will be removed in the future and replaced by mysqli.

Ask the developer to check that all mysql-related modules in the project's php project are changed to mysqli.

Such as this line:

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

Similar:

1. change mysql_connect to mysqli_connect2, mysql_query to mysqli_query3, and mysql_close to 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.