我正在使用ipinfo.io使用PHP获取我当前的城市(位置)。但是,在使用这段代码时,我看不到我所在的城市。$ipaddress=$_SERVER["REMOTE_ADDR"];functionip_details($ip){$json=file_get_contents("http://ipinfo.io/{$ip}/geo");$details=json_decode($json);return$details;}$details=ip_details($ipaddress);echo$details->city;不知道哪里出错了 最佳答案