首先感谢版主热心回复。 根据建议在iptest.php中 将 $ip=get_real_ip(); 更换为 if(isset($_GET['ip'])) $ip = $_GET['ip']; else $ip=get_real_ip(); 测试时得到报错: “Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in E:\Code\PHP\iptest.php on line 65 您的IP是:10.20.4.7 来自:”再次请教。。感谢。
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given 表示你的查询指令错了 你看看 $sq 的值
如果2没有找到对应单位,那就是4了!
if(isset($_GET['ip'])) $ip = $_GET['ip'];
else $ip=get_real_ip();
首先感谢版主热心回复。
根据建议在iptest.php中
将
$ip=get_real_ip();
更换为
if(isset($_GET['ip'])) $ip = $_GET['ip'];
else $ip=get_real_ip();
测试时得到报错:
“Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in E:\Code\PHP\iptest.php on line 65
您的IP是:10.20.4.7 来自:”再次请教。。感谢。
表示你的查询指令错了
你看看 $sq 的值