2016-02-08 08:39
浏览 129


my connection string is:

    $connection = mysql_connect("localhost", "root", "") or die("Could Not Connect to DB: ".mysql_error());

but on my computer i have installed IIS server first so localhost:80 is reserved by it so I changed my port to 8080 changing httpd.conf file in apache folder.

Now what should I change in connection string to connect to my database. I am using XAMPP .

should I tried writing these: 1:

  $connection = mysql_connect("localhost:8080", "root", "") or  die("Could Not Connect to DB: ".mysql_error());


$connection = mysql_connect("localhost,8080", "root", "") or    die("Could Not Connect to DB: ".mysql_error());

But Not working Help please. Thank You

图片转代码服务由CSDN问答提供 功能建议

我的连接字符串是:</ p>

  $ connection = mysql_connect(  “localhost”,“root”,“”或死(“无法连接到DB:”。mysql_error()); 
 </ code> </ pre> 

但在我的计算机上 已经安装了IIS服务器,所以localhost:80是由它保留的所以我将端口更改为8080更改了apache文件夹中的httpd.conf文件。</ p>

现在我应该在连接字符串中更改什么来连接 我正在使用XAMPP。</ p>

我应该尝试编写这些文件: 1:</ p>

  $ connection = mysql_connect(“  localhost:8080“,”root“,”“或死(”无法连接到DB:“。mysql_error()); 
 </ code> </ pre> 

2:</ p>

  $ connection = mysql_connect(“localhost,8080”,“root”,“”)或die(“无法连接到DB:”。mysql_error()); 
 <  / code> </ pre> 

但请不要帮助。 谢谢你</ p> </ div>

2条回答 默认 最新

相关推荐 更多相似问题