-3

So basically I've created a MYSQL database that holds information about a gaming server player information, it's loaded into this PHP website that I created just 2 days ago (I'm completely new to PHP, I only started experimenting on it 2 days ago). So I had it all fixed up but on a localhost, it could fetch the data from the mysql database but only in the localhost, today I wanted to host a free mysql hostname is: fdb3.runhosting.com username: 1141497_damagedz and ofcourse I know the password. But when I'm trying to type this in via my PHP code in the db_connect line it gives me error saying it fails to connect at line 13 which is the line of $db_connect line, before it did work under the localhost but just now it doesnt work because I've deleted 3 files from xampp but surely that shouldnt matter now since its hosted on a whole different place like fdb3.runhosting.com ??

Also I'm using Adobe Dreamweaver to make the PHP website, before I just had to type in

http://localhost/tester.php 

to open up my tester.php website that I've been working on, but now after I deleted the xampp it wont open this so I can't really tell what I'm doing or does it work or not, this is after I deleted my xampp, which is after I deleted my 3 files from xampp. So you can see i'm really confused and I do not know how to fix this at all, I don't know why db_connect at php gives me errors when clearly my fdb3.runhosting.com mysql database works just fine... I've created tables there too. Also how may I run my tester.php file without the localhost? Please tell me I'm really confused and really need help, thank you!

4

2 回答 2

1

“我已经从 xampp 中删除了 3 个文件,但肯定没关系”

哪 3 个文件,你是如何得出这个结论的?你所说的一切都倾向于表明相反的情况!

重新安装 XAMPP 是合乎逻辑的第一选择。备份您的 htdocs 文件夹,然后重新安装。不知道你是否需要备份(我怀疑不是)

于 2012-09-08T20:37:11.257 回答
0

我同意大卫

fdb3.runhosting.com在本地计算机上使用 PHP 脚本时,您不太可能使用远程数据库。XAMPP 包含一个 MySQL 数据库服务器,如果您没有删除 phpMyAdmin,您将能够使用它来浏览其上的数据库。

在本地 XAMPP 安装和本地 XAMPP 数据库上开发网站,然后将数据库导出到远程主机,并在准备好在线查看时复制文件。

保留 XAMPP 安装文件夹和其他文件夹也是值得的,因为它包含有关 XAMP 的信息,我相信可以让您检查您正在运行的版本是否是最新版本。

于 2012-09-09T00:41:08.957 回答