what does the colon mean in php in the following example.
::1
if($host == "" || $ip == "::1")
I think you are referring to the loopback adress of IPv6.
::1
is a "shortcut" for 0:0:0:0:0:0:0:1
, which is the IPv6 version of 127.0.0.1
in IPv4.
The adress probably comes from $_SERVER['REMOTE_ADDR']
.
阿帕奇/ PHP提供:: 1作为$_SERVER['REMOTE_ADDR']
值在访问服务器时在本地(完整的IP地址是127.0.0.1)。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.