作者:略 | 来源:互联网 | 2024-10-14 14:33
I can connect to my database just fine when I'm on my website, but when I'm on my notepad++, and I tried to connect to my database, I get the error below. I have XAMPP installed, and apache is working smoothly, but the only thing is that I can't connect to the database while in the notepad++, and yet it works when I'm on my website. All the files are copied from my website, so there is no discrepancy between the files on my website, and the files on my notepad++. I use localhost to get to the index of my page using notepad++, and it works fine. Only when I tried to register information to my database did the error below show up. Please help. Thanks.
当我在我的网站上时,我可以很好地连接到我的数据库,但当我在我的记事本++上,并且我尝试连接到我的数据库时,我得到以下错误。我安装了XAMPP,并且apache工作顺利,但唯一的一点就是我在notepad ++中无法连接到数据库,但是当我在我的网站上时它可以工作。所有文件都是从我的网站复制的,所以我网站上的文件和记事本++上的文件没有差异。我使用localhost来使用notepad ++来访问我的页面索引,它运行正常。只有当我尝试将信息注册到我的数据库时,才会显示以下错误。请帮忙。谢谢。
Warning: mysql_connect(): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in E:\xampp\htdocs\iscattered\register.php on line 3 Not connect :A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
警告:mysql_connect():连接尝试失败,因为连接方在一段时间后没有正确响应,或者由于连接主机无法响应而建立连接失败。在第3行的E:\ xampp \ htdocs \ iscattered \ register.php中未连接:连接尝试失败,因为连接方在一段时间后没有正确响应,或者由于连接主机无法响应而建立连接失败。
1 个解决方案