Skip to content

Commit bcfb2b6

Browse files
committed
Update curl/filesystem/image/imagick/json/mbstring/opcache/yaf
1 parent 9ae9168 commit bcfb2b6

File tree

11 files changed

+108
-120
lines changed

11 files changed

+108
-120
lines changed

reference/curl/constants_curl_setopt.xml

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,8 @@
605605
</term>
606606
<listitem>
607607
<para>
608-
Accepts a file handle <type>resource</type>
609-
to the file that the transfer should be written to.
610-
The default is <constant>STDOUT</constant> (the browser window).
611-
Available as of cURL 7.1.0 and deprecated as of cURL 7.9.7.
608+
接受文件句柄 <type>resource</type>,用于指定传输内容应写入的文件。默认值为
609+
<constant>STDOUT</constant>(浏览器窗口)。自 cURL 7.1.0 起可用,并自 cURL 7.9.7 起被弃用。
612610
</para>
613611
</listitem>
614612
</varlistentry>
@@ -631,8 +629,7 @@
631629
</term>
632630
<listitem>
633631
<para>
634-
Pass a <type>callable</type> that will be used for wildcard matching.
635-
The signature of the callback should be:
632+
传递用于通配符匹配的 <type>callable</type>。回调函数的签名应为:
636633
<methodsynopsis>
637634
<type>int</type><methodname><replaceable>callback</replaceable></methodname>
638635
<methodparam><type>resource</type><parameter>curlHandle</parameter></methodparam>
@@ -644,32 +641,30 @@
644641
<term><parameter>curlHandle</parameter></term>
645642
<listitem>
646643
<simpara>
647-
The cURL handle.
644+
cURL 句柄。
648645
</simpara>
649646
</listitem>
650647
</varlistentry>
651648
<varlistentry>
652649
<term><parameter>pattern</parameter></term>
653650
<listitem>
654651
<simpara>
655-
The wildcard pattern.
652+
通配符模式。
656653
</simpara>
657654
</listitem>
658655
</varlistentry>
659656
<varlistentry>
660657
<term><parameter>string</parameter></term>
661658
<listitem>
662659
<simpara>
663-
The <type>string</type> to run the wildcard pattern matching on.
660+
用于运行通配符模式匹配的 <type>string</type>
664661
</simpara>
665662
</listitem>
666663
</varlistentry>
667664
</variablelist>
668-
The callback should return
669-
<constant>CURL_FNMATCHFUNC_MATCH</constant> if pattern matches the <type>string</type>,
670-
<constant>CURL_FNMATCHFUNC_NOMATCH</constant> if not
671-
or <constant>CURL_FNMATCHFUNC_FAIL</constant> if an error occurred.
672-
Available as of cURL 7.21.0.
665+
如果模式匹配 <type>string</type>,回调函数应返回 <constant>CURL_FNMATCHFUNC_MATCH</constant>;如果不匹配,返回
666+
<constant>CURL_FNMATCHFUNC_NOMATCH</constant>;如果发生错误,返回
667+
<constant>CURL_FNMATCHFUNC_FAIL</constant>。自 cURL 7.21.0 起可用。
673668
</para>
674669
</listitem>
675670
</varlistentry>
@@ -749,13 +744,10 @@
749744
</term>
750745
<listitem>
751746
<para>
752-
A <type>string</type> which will be used to get the IP address to use for the FTP <literal>PORT</literal> instruction. The <literal>PORT</literal> instruction tells
753-
the remote server to connect to our specified IP address. The
754-
<type>string</type> may be a plain IP address, a hostname,
755-
a network interface name (under Unix),
756-
or just a plain <literal>-</literal> to use the system's default IP address.
757-
This option accepts a <type>string</type> or &null;.
758-
Available as of cURL 7.1.0.
747+
用于获取 FTP <literal>PORT</literal> 指令所使用的 IP 地址的 <type>string</type>。<literal>PORT</literal>
748+
指令会告知远程服务器连接到指定 IP 地址。该 <type>string</type> 可以是纯 IP 地址、主机名、网络接口名称(在
749+
Unix 系统下),或者仅为一个短横线 <literal>-</literal>,以使用系统的默认 IP 地址。此选项接受 <type>string</type>
750+
&null;。自 cURL 7.1.0 起可用。
759751
</para>
760752
</listitem>
761753
</varlistentry>
@@ -778,12 +770,9 @@
778770
</term>
779771
<listitem>
780772
<para>
781-
Pass a <type>string</type> that will be sent as account information over FTP
782-
(using the <literal>ACCT</literal> command) after username and password has been provided
783-
to the server.
784-
Set to &null; to disable sending the account information.
785-
Defaults to &null;.
786-
Available as of cURL 7.13.0.
773+
传递 <type>string</type>,将通过 FTP(使用 <literal>ACCT</literal>
774+
命令)在提供用户名和密码后作为账户信息发送到服务器。设置为 &null; 可禁用发送账户信息。默认值为
775+
&null;。自 cURL 7.13.0 起可用。
787776
</para>
788777
</listitem>
789778
</varlistentry>
@@ -794,9 +783,8 @@
794783
</term>
795784
<listitem>
796785
<para>
797-
Pass a <type>string</type> that will be used to try to authenticate over FTP
798-
if the <literal>USER/PASS</literal> negotiation fails.
799-
Available as of cURL 7.15.5.
786+
传递 <type>string</type>,将在 <literal>USER/PASS</literal> 协商失败时用于尝试通过
787+
FTP 进行身份验证。自 cURL 7.15.5 起可用。
800788
</para>
801789
</listitem>
802790
</varlistentry>

reference/curl/functions/curl-escape.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: fc9a0a8b29a7a099998bdd71fe5350a10b18fe62 Maintainer: 胡搞 Status: ready -->
3+
<!-- EN-Revision: 98ee565bfbea26d2a9c8f8a8707f0403603f719e Maintainer: 胡搞 Status: ready -->
44
<!-- CREDITS: mowangjuanzi -->
55
<refentry xml:id="function.curl-escape" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
66
<refnamediv>
@@ -68,6 +68,7 @@
6868
<programlisting role="php">
6969
<![CDATA[
7070
<?php
71+
7172
// 创建 curl 句柄
7273
$ch = curl_init();
7374
@@ -79,10 +80,11 @@ $location = curl_escape($ch, 'Hofbräuhaus / München');
7980
$url = "http://example.com/add_location.php?location={$location}";
8081
// 结果:http://example.com/add_location.php?location=Hofbr%C3%A4uhaus%20%2F%20M%C3%BCnchen
8182
82-
// 发送 HTTP 请求并关闭句柄
83+
// 设置选项并发送 HTTP 请求
8384
curl_setopt($ch, CURLOPT_URL, $url);
8485
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
8586
curl_exec($ch);
87+
8688
?>
8789
]]>
8890
</programlisting>

reference/filesystem/functions/fopen.xml

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@
3030
<term><parameter>filename</parameter></term>
3131
<listitem>
3232
<para>
33-
如果 <parameter>filename</parameter>
34-
是 "scheme://..." 的格式,则被当成一个
33+
如果 <parameter>filename</parameter> 是 "scheme://..." 的格式,则被当成一个
3534
URL,PHP 将搜索协议处理器(也被称为封装协议)来处理此模式。如果该协议尚未注册封装协议,PHP
36-
将发出一条消息来帮助检查脚本中潜在的问题并将
37-
<parameter>filename</parameter>
35+
将发出一条消息来帮助检查脚本中潜在的问题并将 <parameter>filename</parameter>
3836
当成一个普通的文件名继续执行下去。
3937
</para>
4038
<para>
@@ -45,17 +43,14 @@
4543
则会应用进一步的限制。
4644
</para>
4745
<para>
48-
如果 PHP 认为 <parameter>filename</parameter>
49-
指定的是一个已注册的协议,而该协议被注册为一个网络
50-
URL,PHP 将检查并确认
51-
<link linkend="ini.allow-url-fopen">allow_url_fopen</link>
46+
如果 PHP 认为 <parameter>filename</parameter> 指定的是一个已注册的协议,而该协议被注册为一个网络
47+
URL,PHP 将检查并确认 <link linkend="ini.allow-url-fopen">allow_url_fopen</link>
5248
已被激活。如果关闭了,PHP 将发出一个警告,而 <function>fopen</function> 的调用则失败。
5349
</para>
5450
<note>
5551
<para>
5652
所支持的协议列表见<xref linkend="wrappers"/>。某些协议(也被称为
57-
<literal>wrappers</literal>)支持
58-
<literal>context</literal> 和/或 &php.ini;
53+
<literal>wrappers</literal>)支持 <literal>context</literal> 和/或 &php.ini;
5954
选项。参见相应的页面哪些选项可以被设定(例如 &php.ini; 中用于
6055
<literal>http</literal> wrapper 的 <literal>user_agent</literal> 值)。
6156
</para>
@@ -133,10 +128,9 @@ $handle = fopen("c:\\folder\\resource.txt", "r");
133128
<row>
134129
<entry><literal>'x'</literal></entry>
135130
<entry>
136-
创建并以写入方式打开,将文件指针指向文件头。如果文件已存在,则
137-
<function>fopen</function> 调用失败并返回 &false;,并生成一条
138-
<constant>E_WARNING</constant> 级别的错误信息。如果文件不存在则尝试创建之。这和给
139-
底层的 <literal>open(2)</literal> 系统调用指定
131+
创建并以写入方式打开,将文件指针指向文件头。如果文件已存在,则 <function>fopen</function>
132+
调用失败并返回 &false;,并生成一条 <constant>E_WARNING</constant>
133+
级别的错误信息。如果文件不存在则尝试创建之。这和给底层的 <literal>open(2)</literal> 系统调用指定
140134
<literal>O_EXCL|O_CREAT</literal> 标记是等价的。
141135
</entry>
142136
</row>
@@ -180,10 +174,8 @@ $handle = fopen("c:\\folder\\resource.txt", "r");
180174
<note>
181175
<para>
182176
不同的操作系统家族具有不同的行结束习惯。当写入一个文本文件并想插入一个新行时,需要使用符合操作系统的行结束符号。基于
183-
Unix 的系统使用 <literal>\n</literal>
184-
作为行结束字符,基于 Windows 的系统使用 <literal>\r\n</literal>
185-
作为行结束字符,基于 Macintosh 的系统(传统 Mac OS)使用 <literal>\r</literal>
186-
作为行结束字符。
177+
Unix 的系统使用 <literal>\n</literal> 作为行结束字符,基于 Windows 的系统使用 <literal>\r\n</literal>
178+
作为行结束字符,基于 Macintosh 的系统(传统 Mac OS)使用 <literal>\r</literal> 作为行结束字符。
187179
</para>
188180
<para>
189181
如果写入文件时使用了错误的行结束符号,则其它应用程序打开这些文件时可能会表现得很怪异。
@@ -203,15 +195,13 @@ $handle = fopen("c:\\folder\\resource.txt", "r");
203195
<literal>'t'</literal>。在所有其它情况下使用 <literal>'b'</literal>。
204196
</para>
205197
<para>
206-
在操作二进制文件时如果指定 <literal>'t'</literal>
207-
标记,可能会碰到一些奇怪的问题,包括坏掉的图片文件以及关于
198+
在操作二进制文件时如果指定 <literal>'t'</literal> 标记,可能会碰到一些奇怪的问题,包括坏掉的图片文件以及关于
208199
<literal>\r\n</literal> 字符的奇怪问题。
209200
</para>
210201
</note>
211202
<note>
212203
<para>
213-
为移植性考虑,强烈建议重写那些依赖于
214-
<literal>'t'</literal> 模式的代码使其使用正确的行结束符并改成
204+
为移植性考虑,强烈建议重写那些依赖于 <literal>'t'</literal> 模式的代码使其使用正确的行结束符并改成
215205
<literal>'b'</literal> 模式。
216206
</para>
217207
</note>
@@ -285,7 +275,7 @@ $handle = fopen("c:\\folder\\resource.txt", "r");
285275
&reftitle.examples;
286276
<para>
287277
<example>
288-
<title><function>fopen</function> 例子</title>
278+
<title><function>fopen</function> 示例</title>
289279
<programlisting role="php">
290280
<![CDATA[
291281
<?php
@@ -311,11 +301,9 @@ $handle = fopen("ftp://user:[email protected]/somefile.txt", "w");
311301
</note>
312302
<note>
313303
<para>
314-
This function may also succeed when <parameter>filename</parameter> is a
315-
directory. If you are unsure whether <parameter>filename</parameter> is a
316-
file or a directory, you may need to use the <function>is_dir</function>
317-
function before calling <function>fopen</function>.
318-
</para>
304+
当 <parameter>filename</parameter> 为目录时,此函数也可能成功。如果不确定 <parameter>filename</parameter>
305+
是文件还是目录,则在调用 <function>fopen</function> 之前可能需要使用 <function>is_dir</function> 函数进行判断。
306+
</para>
319307
</note>
320308
</refsect1>
321309

reference/filter/constants.xml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: edb34f53e1d711a5bd968d1fe1b9b41e58ed38cb Maintainer: daijie Status: ready -->
3+
<!-- EN-Revision: 9b09581bfdd1fa1c33daa740ad49599cf665cff4 Maintainer: daijie Status: ready -->
44
<!-- CREDITS: mowangjuanzi -->
55
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
66
<appendix xml:id="filter.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -259,15 +259,15 @@
259259
</term>
260260
<listitem>
261261
<simpara>
262-
对于 <literal>"1"</literal>、<literal>"true"</literal>、<literal>"on"</literal>
262+
对于 <literal>"1"</literal>、<literal>1</literal>(包括二进制、八进制和十六进制表示法)、<literal>1.0</literal>、<literal>"true"</literal>、<literal>true</literal>、<literal>"on"</literal>
263263
和 <literal>"yes"</literal> 返回 &true;
264264
</simpara>
265265
<simpara>
266-
对于 <literal>"0"</literal>、<literal>"false"</literal>、<literal>"off"</literal>、<literal>"no"</literal>
266+
对于 <literal>"0"</literal>、<literal>0</literal>(包括二进制、八进制和十六进制表示法)、<literal>0.0</literal>、<literal>"false"</literal>、<literal>false</literal>、<literal>"off"</literal>、<literal>"no"</literal>
267267
和 <literal>""</literal> 返回 &false;
268268
</simpara>
269269
<simpara>
270-
非 bool 值的返回值取决于 <constant>FILTER_NULL_ON_FAILURE</constant>。如果设置,则返回 &null;,否则返回 &false;
270+
字符串值的比较不区分大小写。非 bool 值的返回值取决于 <constant>FILTER_NULL_ON_FAILURE</constant>。如果设置,则返回 &null;,否则返回 &false;
271271
</simpara>
272272
<variablelist xml:id="filter.constants.validation.bool.options">
273273
<title>可用选项</title>
@@ -476,7 +476,7 @@
476476
</term>
477477
<listitem>
478478
<simpara>
479-
根据 <link xlink:href="&url.rfc;2396">RFC 2396</link> 验证 <acronym>URL</acronym> 名称是否有效
479+
根据 <link xlink:href="&url.rfc;2396">RFC 2396</link> 验证 <acronym>URL</acronym> 是否有效
480480
</simpara>
481481
<variablelist xml:id="filter.constants.validation.url.options">
482482
<title>可用选项</title>
@@ -896,7 +896,9 @@
896896
<member><literal>&gt;</literal></member>
897897
<member><literal>&amp;</literal></member>
898898
</simplelist>
899-
和 ASCII 值小于 32 的字符进行 HTML 编码。
899+
和 ASCII 值小于 32 的字符进行 HTML 编码。与 <constant>FILTER_SANITIZE_FULL_SPECIAL_CHARS</constant>
900+
过滤器不同,<constant>FILTER_SANITIZE_SPECIAL_CHARS</constant> 过滤器会忽略
901+
<constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant> flag。
900902
</para>
901903
<simpara>
902904
如果与 <constant>FILTER_FLAG_STRIP_<replaceable>*</replaceable></constant> 过滤器清理

reference/image/functions/getimagesize.xml

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
<note>
3535
<simpara>
3636
注意 JPC 和 JP2 是具有不同位深度的组件。此外,JP2 文件可能包含有<literal>多个 JPEG 2000
37-
代码流</literal>,此情况下,<function>getimagesize</function>
38-
返回此文件顶层中碰到的第一个代码流的值。
37+
代码流</literal>,此情况下,<function>getimagesize</function> 返回此文件顶层中碰到的第一个代码流的值。
3938
</simpara>
4039
</note>
4140
<note>
@@ -66,12 +65,10 @@
6665
<term><parameter>image_info</parameter></term>
6766
<listitem>
6867
<para>
69-
可选参数允许从图像文件中提取一些扩展信息。目前会将不同的 <acronym>JPG</acronym> APP
70-
标记作为关联数组返回。一些程序使用这些 APP 标记在图像中嵌入文本信息。
71-
A very common one is to embed
72-
<link xlink:href="&url.iptc;">IPTC</link> information in the APP13 marker.
73-
You can use the <function>iptcparse</function> function to parse the
74-
binary APP13 marker into something readable.
68+
此可选参数允许从图像文件中提取一些扩展信息。目前会将不同的 <acronym>JPG</acronym> APP
69+
标记作为关联数组返回。一些程序使用这些 APP 标记在图像中嵌入文本信息。一个非常常见的用途是将
70+
<link xlink:href="&url.iptc;">IPTC</link> 信息嵌入到 APP13 标记中。可以使用
71+
<function>iptcparse</function> 函数将二进制的 APP13 标记解析为可读的内容。
7572
</para>
7673
<note>
7774
<para>
@@ -100,22 +97,18 @@
10097
</note>
10198
<note>
10299
<simpara>
103-
<function>getimagesize</function> 是独立于任何图像元数据的。
104-
例如,如果 Exif <literal>Orientation</literal> 标志设置为将图像旋转 90 或 270 度的值,
105-
索引 0 和 1 被交换,即包含高度和宽度。
100+
<function>getimagesize</function> 是独立于任何图像元数据的。例如,如果 Exif <literal>Orientation</literal>
101+
标志设置为将图像旋转 90 或 270 度的值,索引 0 和 1 被交换,即包含高度和宽度。
106102
</simpara>
107103
</note>
108104
<para>
109105
索引 2 是表示图像类型的某个 <constant>IMAGETYPE_<replaceable>*</replaceable></constant> 常量。
110106
</para>
111107
<para>
112-
Index 3 is a text string with the correct
113-
<literal>height="yyy" width="xxx"</literal> string that can be used
114-
directly in an <acronym>IMG</acronym> tag.
108+
索引 3 是文本字符串,包含可以直接用于 <acronym>IMG</acronym> 标签的正确 <literal>height="yyy" width="xxx"</literal> 字符串。
115109
</para>
116110
<para>
117-
<literal>mime</literal> 是图像对应的 MIME 类型。此信息可用于传递具有正确 HTTP
118-
<literal>Content-type</literal> 报头的图像:
111+
<literal>mime</literal> 是图像对应的 MIME 类型。此信息可用于传递具有正确 HTTP <literal>Content-type</literal> 报头的图像:
119112
<example>
120113
<title><function>getimagesize</function> 和 MIME 类型</title>
121114
<programlisting role="php">
@@ -142,10 +135,8 @@ if ($size && $fp) {
142135
<literal>bits</literal> 是每种颜色的位数。
143136
</para>
144137
<para>
145-
对应一些图像类型,<literal>channels</literal> 和 <literal>bits</literal> 值的存在可能会让人困惑。
146-
As an example, <acronym>GIF</acronym> always uses 3 channels
147-
per pixel, but the number of bits per pixel cannot be calculated for an
148-
animated <acronym>GIF</acronym> with a global color table.
138+
对应一些图像类型,<literal>channels</literal> 和 <literal>bits</literal> 的存在可能会让人困惑。例如,<acronym>GIF</acronym>
139+
每个像素始终使用 3 个通道,但对于带有全局彩色表的动画 <acronym>GIF</acronym>,却无法计算每个像素的位数。
149140
</para>
150141
<para>
151142
失败时返回 &false;

reference/image/functions/imagedestroy.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: de13997491811ade18c2d23e9959ef2825154add Maintainer: dallas Status: ready -->
3+
<!-- EN-Revision: ce98b568f85353c4bf263133f09c4db9294833f9 Maintainer: dallas Status: ready -->
44
<!-- CREDITS: mowangjuanzi -->
55
<refentry xml:id="function.imagedestroy" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
77
<refname>imagedestroy</refname>
88
<refpurpose>销毁图像</refpurpose>
99
</refnamediv>
10+
<refsynopsisdiv>
11+
&warn.deprecated.function-8-5-0;
12+
</refsynopsisdiv>
1013
<refsect1 role="description">
1114
&reftitle.description;
1215
<methodsynopsis>
16+
<modifier role="attribute">#[\Deprecated]</modifier>
1317
<type>bool</type><methodname>imagedestroy</methodname>
1418
<methodparam><type>GdImage</type><parameter>image</parameter></methodparam>
1519
</methodsynopsis>

0 commit comments

Comments
 (0)