php中不能运用mysqli函数,php.ini中已经配置了,但是用不了mysqli
Warning:mysqli::mysqli()[mysqli.mysqli]:(28000/1045):Accessdeniedforuser'root'@'local...
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 展开
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 展开
3个回答
2012-10-12 · 知道合伙人软件行家
关注
展开全部
1. 通过使用 phpinfo()函数可以查看 mysqli 的工作情况。
2. Warning: mysqli::mysqli() [mysqli.mysqli]: (28000/1045): Access denied for user 'root'@'localhost' (using password: YES)
从这句错误提示来看,我建议你查看下,是不是mysql数据库用户名跟密码不正确导致的。
2. Warning: mysqli::mysqli() [mysqli.mysqli]: (28000/1045): Access denied for user 'root'@'localhost' (using password: YES)
从这句错误提示来看,我建议你查看下,是不是mysql数据库用户名跟密码不正确导致的。
更多追问追答
追问
不是用户名与密码不正确,这个如果我用mysql方法就可以正确地显示
追答
你可以把出错的代码粘出来看下。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询