Reason: The integer value converted by IP is too large and exceeds the range of the integer, so it becomes a negative number. You need to make the following modifications, modify it to $ip_n = bindec(decbin(ip2long($ip))) to get the unsigned integer. For example:
|