更新时间:2022-06-09 23:02:35
您正在使用 PDO
建立数据库连接。但 $ pdo
实例不再使用!
You are using PDO
to establish a database connection. But $pdo
instance is not used anymore!
要执行SQL语句,需要使用 $ pdo-> query(INSERT INTO mobi ...)
To executes an SQL statement, need to use like $pdo->query("INSERT INTO mobi ...")
而是使用 mysql_query
发送MySQL查询。因此您会收到以下警告:
Instead, You are using mysql_query
to send a MySQL query. So you get these warnings:
用户'root'@'localhost'访问被拒绝(使用密码:NO)
无法建立指向服务器的链接
还要确保您在 header()
函数之前不输出任何字符串等,以删除此警告:
。
Also make sure you are not output any strings, etc... before your header()
function to remove this warning: headers already sent
.