Warning: mysqli::mysqli() [mysqli.mysqli]: (28000/1045): Access denied for user 'root'@'localhost' (using password: YES) in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\ceshi5.php on line 2
Warning: mysqli::query() [mysqli.query]: Couldn't fetch mysqli in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\ceshi5.php on line 4
查询失败
Fatal error: Call to a member function free() on a non-object in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\ceshi5.php on line 12
2. Warning: mysqli::mysqli() [mysqli.mysqli]: (28000/1045): Access denied for user 'root'@'localhost' (using password: YES)
ä»è¿å¥é误æ示æ¥çï¼æå»ºè®®ä½ æ¥çä¸ï¼æ¯ä¸æ¯mysqlæ°æ®åºç¨æ·åè·å¯ç ä¸æ£ç¡®å¯¼è´çã追é®
ä¸æ¯ç¨æ·åä¸å¯ç ä¸æ£ç¡®ï¼è¿ä¸ªå¦ææç¨mysqlæ¹æ³å°±å¯ä»¥æ£ç¡®å°æ¾ç¤º
追çä½ å¯ä»¥æåºéç代ç ç²åºæ¥çä¸ã
追é®query("$query");
if($result){
while($obj=$result->fetch_object()){
var_dump($obj);echo "\n";
}}else{
echo "æ¥è¯¢å¤±è´¥";
}
$result->free();
$mysqli->close();
?>
ä½ ç mysqli ä¿¡æ¯ï¼è·æè¿è¾¹çä¸å¤ªä¸æ ·ï¼
mysqli
MysqlI Supportenabled
Client API library version mysqlnd 5.0.5-dev - 081106 - $Revision: 289630 $
Active Persistent Links 0
Inactive Persistent Links 0
Active Links 0
没有用,我都试过了
追答先用普通连接 连接下 看看 或者在 cmd下连接看看