为了账号安全,请及时绑定邮箱和手机立即绑定

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in D:\wamp64\Demo\test2.php on line 2

为什会出现这个错误,

<?php
$link = mysql_connect('localhost', 'root', 'root') or die('数据库连接失败');
mysql_select_db('db_student');
mysql_query("set names 'utf8'");
$result = mysql_query('select * from tb_admin limit 1');
$row = mysql_fetch_assoc($result);
print_r($row);
?>

这是我的代码

正在回答

2 回答

http://php.net/manual/zh/function.mysqli-connect.php

0 回复 有任何疑惑可以回复我~

mysql 扩展没有开吧

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in D:\wamp64\Demo\test2.php on line 2

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号