我想获取本地主机的IP地址。我使用的是php $_SERVER超级全局:
$_SERVER‘’REMOTE_ADDR‘;我得到了我的IP地址,发现它与我的IP地址不同我的输出如下::1我的结果是对的还是错的怎样才能找到它
发布于 2017-02-16 21:09:46
没错,这是一个IPv6地址。
发布于 2017-02-16 21:13:49
The result whatever you are getting is right..!!!
::1 is the actual ip address.
It is an Ipv6 address in localhost
If you use Ipv4 it will give 127.0.0.1 in localhost..https://stackoverflow.com/questions/42272581
复制相似问题