我正在尝试设置分页,但是有一个烦人的数据库连接错误。你能帮我一把吗?谢谢!
<?php
include('includes/db_AF.php'); //includes the db credentials
$connection = @new mysqli(HOSTNAME, MYSQLUSER, MYSQLPASS, MYSQLDB);
if ($connection->connect_error) {
die('Connect Error: ' . $connection->connect_error);
}
else {
if (!(isset($pagenum)))
{
$pagenum = 1;
}
$data = "SELECT * FROM wordtable2";
$data1 = mysql_query($data);
$rows = mysql_num_rows($data1);
这是错误消息:警告:mysql_query():用户''@'localhost'(使用密码:NO)的访问被拒绝