array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.long2ip.php', 1 => 'long2ip', ), 'up' => array ( 0 => 'ref.network.php', 1 => '网络 函数', ), 'prev' => array ( 0 => 'function.ip2long.php', 1 => 'ip2long', ), 'next' => array ( 0 => 'function.net-get-interfaces.php', 1 => 'net_get_interfaces', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'zh', 'path' => 'reference/network/functions/long2ip.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
long2ip — 将长整型转化为字符串形式带点的互联网标准格式地址(IPV4)
ip
合格的地址,长整型的表达形式。
返回字符串的互联网 IP 地址, 或者在失败时返回 false
。
注意:
在 32 位架构中,从 string 转换 int 整型形式的 ip 地址将有可能导致错误的结果,因为结果数字超出了
PHP_INT_MAX
限制。