我从 Apphp.com 下载了管理员登录面板。 它在本地主机上运行良好。
然后,我在并行 Plesk 服务器 [托管我的网站的位置] 中创建了一个数据库,为其分配了一个用户,导入了 sql 文件并创建了表。
然后我更改了 config.inc.php 设置:
function Config()
{
$this->host = "localhost";
$this->user = "root";
$this->password = "";
$this->database = "testdb";
}
至
function Config()
{
$this->host = "pemysql01.365techsupport.com:3306";
$this->user = "user123";
$this->password = "password";
$this->database = "testdb";
}
正如我已经说过的,代码在本地主机中工作正常,但是当我将数据库和其他文件上传到服务器时,我无法使用我的用户名和密码“test”和“test”登录。它说,用户名或密码错误。相同的代码在本地主机上运行良好。
还有什么我必须做的吗,或者任何人都可以向我建议一个来自任何站点的简单的基于 php 的登录面板源代码。
最佳答案
从这里尝试:
$ mysql -h pemysql01.365techsupport.com -u test -p
Enter password:
ERROR 1045 (28000): Access denied for user 'test'@'xx.xx.xx.xx' (using password: YES)
您的 php 机器可能也遇到同样的问题(即您需要授予其访问权限)
关于php - 登录我的网站管理部分时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18545303/