The MySQL extension is deprecated and'll be removed in the future, what's the reason?
I configured on my Computer 2-plan-team this system, which is written in PHP, after configuration, open index.php, but the following problems: Php Deprecated:mysql_connect (): The MySQL extension is Deprecated and would be removed in the Future:use mysqli or PDO instead in E:\SERVER\2-PLAN-TEAM\INCLUDE\CLASS.DATENBANK.P HP on line 38
Source code for class.datenbank.php:
/*
* The class Datenbank (database) provides methods to handle a database connection
*
* @author original code from Open Dynamics.
* @name Datenbank
* @version 0.4.6
* @package 2-plan
* @link http://2-plan.com
* @license http://opensource.org/licenses/gpl-license.php GNU general Public License V3 or later
*/
Class Datenbank
{
/*
* Constructor
*/
function __construct ()
{
}
/*
* Establish a database connection
*
* @param string $db Database name
* @param string $user Database user
* @param string $pass Password for database access
* @param string $host Database Host
* @return BOOL
*/
Function Connect ($db _name, $db _user, $db _pass, $db _host= "localhost")
{
Mysql
$db = new PDO ("mysql:host= $db _host;dbname= $db _name", $db _user, $db _pass);
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.