doulei6330 2012-09-08 20:31
浏览 59
已采纳

关于我的php网站和mysql连接我真的很困惑和沮丧

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!

  • 写回答

2条回答 默认 最新

  • doupai5450 2012-09-08 20:37
    关注

    "I've deleted 3 files from xampp but surely that shouldnt matter"

    Which 3 files and how do you come to that conclusion? Everything you say tends to indicate the reverse to be true!

    Re-install XAMPP is the logical first option. Backup your htdocs folder then re-install. Don't know if you'll need the backup or not (I suspect not)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程