Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
我在登陆后台的时候出现了这个
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
然后我就把数据库的连接改成了
function connect(){ $link=mysqli_connect(DB_HOST,DB_USER,DB_PWD) or die("数据库连接失败Error:".mysqli_errno().":".mysqli_error()); mysqli_set_charset(DB_CHARSET); mysqli_select_db(DB_DBNAME) or die("指定数据库打开失败"); return $link; }
但是最后登陆后台时又显示
Warning: mysqli_set_charset() expects exactly 2 parameters, 1 given in
E:\www\hahaha\lib\mysql.func.php on line
9
Warning: mysqli_select_db() expects exactly 2 parameters,
1 given in E:\www\hahaha\lib\mysql.func.php on line
10
指定数据库打开失败
我想请教一下这究竟是什么回事啊?