gpt4 book ai didi

php - 从外部服务器连接到 xampp

转载 作者:行者123 更新时间:2023-11-30 22:24:41 25 4
gpt4 key购买 nike

我的错误是:

Warning: mysql_connect(): Can't connect to MySQL server on'0.0.0.0' (4) in /home/user/public_html/email.phpon line 2 Can't connect to MySQL server on '0.0.0.0' (4)

0.0.0.0 = My public IP

我的目标是:

从我在 GoDaddy 托管的网站连接到我的本地 Xampp MySQL 数据库。这是我正在使用的代码

    $connect = mysql_connect("0.0.0.0:3306","DBUser", "DBpassword");
if (!$connect) {
die(mysql_error());
}
mysql_select_db("DBname");
$results4 = mysql_query("SELECT * FROM TableName WHERE didText=0 ORDER BY id DESC LIMIT 1");
while($row4 = mysql_fetch_array($results4)) {
$didIText = $row4['didText'];
$postID= $row4['postID'];
$theirNumber = $row4['phone'];
$offer = $row4['price'];


最佳答案

转到 Windows 命令提示符,输入 ipconfig 并按回车键。这将显示您连接的 IP。获取您正在使用的连接的 IPv4,输入它代替 0.0.0.0 。就是这样。

关于php - 从外部服务器连接到 xampp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35615585/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com