版权声明:宇哥出品,必属精品~~~ https://blog.csdn.net/zhongaiyisheng_/article/details/83626163
首先
可以成功连接,但是会报错, The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead。。。
如下:
意思很明显了啊,mysql_connect在将来的php版本会被废弃,让你用 mysqli 或者PDO代替!把你把连接数据库的代码换成
$link = mysqli_connect(‘localhost’, ‘user’, ‘password’, ‘dbname’);