我无法使用 mysqli 类登录数据库.
I can't login to the database using mysqli class.
我收到下一个错误:
Warning: mysql_query(): Access denied for user 'www-data'@'localhost' (using password: NO)
我有下一个代码:
$this->mysqlCon = new mysqli($siteConfig['db']['hostname'], $siteConfig['db']['username'], $siteConfig['db']['password'], $siteConfig['db']['database']);
var_dump()
of $siteConfig['db']
返回:
array(4) {
["hostname"]=>
string(9) "localhost"
["username"]=>
string(4) "root"
["password"]=>
string(*) "***Censored***"
["database"]=>
string(*) "***Censored***"
}
我的 VPS 正在运行 Debian 6 32 位.
My VPS is running Debian 6 32bit.
Warning: mysql_query()
^---------------------- notice something? :)
您似乎在代码中混淆了 mysql
和 mysqli
.
You seem to be mixing up mysql
and mysqli
in your code.
这篇关于PHP MySQLi 无法识别登录信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!