svn: /phpdoc/zh/trunk/reference/network/functions/ ip2long.xml long2ip.xml
| From: | Dai Jie | Date: | Thu, 05 Oct 2017 09:39:28 +0000 |
| Subject: | svn: /phpdoc/zh/trunk/reference/network/functions/ ip2long.xml long2ip.xml | ||
| Groups: | php.doc.zh | ||
| Request: | Send a blank email to doc-zh+get-5020@lists.php.net to get a copy of this message | ||
daijie Thu, 05 Oct 2017 09:39:28 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=343193
Log:
Sync with EN.
Changed paths:
U phpdoc/zh/trunk/reference/network/functions/ip2long.xml
U phpdoc/zh/trunk/reference/network/functions/long2ip.xml
Modified: phpdoc/zh/trunk/reference/network/functions/ip2long.xml
===================================================================
--- phpdoc/zh/trunk/reference/network/functions/ip2long.xml 2017-10-05 09:30:45 UTC (rev 343192)
+++ phpdoc/zh/trunk/reference/network/functions/ip2long.xml 2017-10-05 09:39:28 UTC (rev 343193)
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 334621 Maintainer: WeijianZhang Status: ready -->
+<!-- EN-Revision: 342153 Maintainer: WeijianZhang Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.ip2long" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>ip2long</refname>
-
<refpurpose>将一个IPV4的字符串互联网协议转换成数字格式</refpurpose>
+ <refpurpose>将 IPV4 的字符串互联网协议转换成长整型数字</refpurpose>
</refnamediv>
<refsect1 role="description">
@@ -16,7 +16,7 @@
<methodparam><type>string</type><parameter>ip_address</parameter></methodparam>
</methodsynopsis>
<para>
- 方法<function>ip2long</function>
产生一个IPV4的互联网地址从互联网标准的格式(点字符串)表示。
+ 函数 <function>ip2long</function> 返回 IPV4
网络地址的长整型格式,从标准网络地址格式(点字符串)转化得到。
</para>
<para>
<function>ip2long</function> 还可以与非完整IP进行工作。
@@ -62,6 +62,14 @@
</thead>
<tbody>
<row>
+ <entry>5.5.0</entry>
+ <entry>
+ Prior to this version, on Windows <function>ip2long</function> would sometimes
return
+ a valid number even if passed a value which was not an (IPv4) Internet Protocol
+ dotted address.
+ </entry>
+ </row>
+ <row>
<entry>5.2.10</entry>
<entry>
再此之前的版本, <function>ip2long</function>
有时会返回即使这不是一个IPV4的标准地址的数字地址。
@@ -121,7 +129,7 @@
&reftitle.notes;
<note>
<para>
- 因为PHP的 <type>integer</type>
类型是有符号,并且有许多的IP地址讲导致在32位系统的情况下为复数,
你需要使用 "%u" 进行转换通过 <function>sprintf</function> 或
+ 因为PHP的 <type>integer</type>
类型是有符号,并且有许多的IP地址讲导致在32位系统的情况下为负数,
你需要使用 "%u" 进行转换通过 <function>sprintf</function> 或
<function>printf</function> 得到的字符串来表示无符号的IP地址。
</para>
</note>
Modified: phpdoc/zh/trunk/reference/network/functions/long2ip.xml
===================================================================
--- phpdoc/zh/trunk/reference/network/functions/long2ip.xml 2017-10-05 09:30:45 UTC (rev 343192)
+++ phpdoc/zh/trunk/reference/network/functions/long2ip.xml 2017-10-05 09:39:28 UTC (rev 343193)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 337846 Maintainer: daijie Status: ready -->
+<!-- EN-Revision: 342916 Maintainer: daijie Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.long2ip" xmlns="http://docbook.org/ns/docbook">
@@ -13,7 +13,7 @@
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>long2ip</methodname>
-
<methodparam><type>string</type><parameter>proper_address</parameter></methodparam>
+
<methodparam><type>int</type><parameter>proper_address</parameter></methodparam>
</methodsynopsis>
<para>
<function>long2ip</function>
函数通过长整型的表达形式转化生成带点格式的互联网地址(例如:aaa.bbb.ccc.ddd
)。
@@ -43,6 +43,37 @@
</para>
</refsect1>
+ <refsect1 role="changelog"><!-- {{{ -->
+ &reftitle.changelog;
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>7.1.0</entry>
+ <entry>
+ 参数 <parameter>proper_address</parameter> 的类型从
<type>string</type> 改成 <type>integer</type>。
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1><!-- }}} -->
+
+ <refsect1 role="notes"><!-- {{{ -->
+ &reftitle.notes;
+ <note>
+ <para>
+ 在 32 位架构中,从 <type>string</type> 转换
<type>integer</type> 整型形式的 ip
地址将有可能导致错误的结果,因为结果数字超出了
<constant>PHP_INT_MAX</constant> 限制。
+ </para>
+ </note>
+ </refsect1><!-- }}} -->
+
<refsect1 role="seealso">
&reftitle.seealso;
<para>