mysql_connect 语句之前的一些注释告诉我将值/变量名称修改为我的安装。我现在正在使用 xamp 并查看 php.ini。真的不知道问题出在哪里。请指教。谢谢。
php:
$dbhost = 'localhost'; //unlikely to require changing.
$dbname ='publication'; //moify these
$dbuser = 'username'; //variables
$dbpass = 'password'; //// to your installation
$appname = 'Robot City'; // and preference
mysql_connect($dbhost, $dbuser, $dbpass) or die(mysql_error());
错误信息:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'username'@'localhost' (using password: YES) in C:\xampp\htdocs\ajaxpagination\testpage.php on line 10
Access denied for user 'username'@'localhost' (using password: YES)