热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

无法连接到记事本++上的数据库-Can'tconnecttodatabaseonnotepad++

IcanconnecttomydatabasejustfinewhenImonmywebsite,butwhenImonmynotepad++,andIt

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 个解决方案

#1


Try mysqli.. somethink like

尝试mysqli ..有些想法



推荐阅读
author-avatar
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有