TP Frame Newspaper "mysql_connect (): The MySQL extension is deprecated and would be being removed in the Future:use mysqli or PDO instead" warning letter Interest

Source: Internet
Author: User
Tags deprecated

The warning message is "mysql_connect (): The MySQL extension is deprecated and would be a removed in the Future:use mysqli or PDO instead......\th inkphp\library\think\db\driver\mysql.class.php line 52nd. "

It is recommended that you connect to the database with mysqli or PDO, because mysql_connect () will be removed in the future;

This is only a warning message, as did not see also wide, to the PHP configuration file inside the error notification level to modify the line, let the warning suppressed;

Such an approach is expedient, for rigorous defensive programming is not advisable, because it is only temporarily hidden trouble, obsessive-compulsive patients will be very tangled in the heart;

So since it is in the TP framework, this problem arises, according to the idea of TP to solve;

Under the Db/driver folder, in addition to the MySQL link and mysqli and so on, you want to warn the suggestion:

Is it okay to use mysqli?

So how to modify it?

It's easy to find your "Db_type" entry in your database connection file,

Usually "MySQL", here to modify the "mysqli" on it;

You can say goodbye to this annoying warning.

The same is in TP3.2.2.

TP Frame Newspaper "mysql_connect (): The MySQL extension is deprecated and would be being removed in the Future:use mysqli or PDO instead" warning letter Interest

Related Article

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.