Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user '哈哈'@'localhost' (using password: NO) in E:\member\postReg.php:17 Stack trace: #0 E:\member\postReg.php(17): PDO->__construct('mysql:host=;dbn...', '\xE5\x93\x88\xE5\x93\x88', NULL) #1 {main} thrown in E:\member\postReg.php on line 17
是哪里出了问题 求解 很着急
去掉圈出来的那句代码,用mysqli了干嘛又新建个PDO链接对象干嘛,没必要用PDO了
MySQL数据库的登录用户是"哈哈"?登录失败,检查用户名及密码是否正确。
new PDO参数是错误的,也没有必要new PDO
Fatal error: Uncaught PDOException
这个是 PDO 设定错误。在这行
E:\member\postReg.php:17
已经使用了 mysqli 就不需要用 pdo.
删除了之后,如果有错误码再放出来看看。