// 使用 sprintf 返回无符号十进制数
$long = sprintf("%u",ip2long($ip));
// 先转换为二进制然后在转换为十进制
$long = bindec(decbin(ip2long($ip)));
Copy after login
http://www.bkjia.com/PHPjc/626640.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/626640.htmlTechArticle// Use sprintf to return an unsigned decimal number $long = sprintf("%u",ip2long($ip) );//Convert to binary first and then to decimal $long = bindec(decbin(ip2long($ip)));...