Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
331 changes: 187 additions & 144 deletions install/unix/apache2.xml

Large diffs are not rendered by default.

57 changes: 48 additions & 9 deletions language-snippets.ent
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: de78d65ef7785a167268b3cb5d5268b13bb9f358 Maintainer: Gregory Status: ready -->
<!-- EN-Revision: 8465ca6ec4bbcf79583ecd057860164dd9c7e385 Maintainer: Gregory Status: ready -->
<!-- CREDITS: dallas, mowangjuanzi, Luffy -->
<!-- 请保持此文件与英文文件中相应的每个 ENTITY 行号一一对应以便于对照,修改与更新! -->
<!ENTITY installation.enabled.disable '此扩展默认为启用,编译时可通过下列选项禁用:'>
Expand Down Expand Up @@ -100,9 +100,11 @@ and missing arguments are replaced with their defaults.
This function ignores the collection of unknown named variadic arguments.
Unknown named arguments which are collected can only be accessed through the variadic parameter.</simpara></note>'>

<!ENTITY note.line-endings '<note xmlns="http://docbook.org/ns/docbook"><simpara>在读取在 Macintosh 电脑中或由其创建的文件时, 如果 PHP
不能正确的识别行结束符,启用运行时配置可选项 <link linkend="ini.auto-detect-line-endings">auto_detect_line_endings</link>
也许可以解决此问题。</simpara></note>'>
<!ENTITY note.line-endings '<note xmlns="http://docbook.org/ns/docbook"><simpara>在 PHP 8.1.0 之前,
可以启用 <link linkend="ini.auto-detect-line-endings">auto_detect_line_endings</link>
运行时配置选项,帮助 PHP 正确识别读取 Macintosh 系统创建的文件时的行结束符。
此选项自 PHP 8.1.0 起弃用。如有必要,请改为手动处理 <literal>"\r"</literal>
换行符。</simpara></note>'>



Expand Down Expand Up @@ -232,6 +234,10 @@ PHP 版本中发生变化而不另行通知。使用本扩展应自行承担风
<!ENTITY deprecated.function '此函数已废弃。'>
<!ENTITY removed.function '此函数已移除。'>

<!ENTITY warn.deprecated.feature-5-6-0 '<warning
xmlns="http://docbook.org/ns/docbook"><simpara>此特性自 PHP 5.6.0 起
<emphasis>弃用</emphasis>。强烈不建议依赖此特性。</simpara></warning>'>

<!ENTITY warn.deprecated.feature-7-1-0 '<warning
xmlns="http://docbook.org/ns/docbook"><simpara>本特性已自 PHP 7.1.0
起<emphasis>废弃</emphasis>。强烈建议不要使用本特性。</simpara></warning>'>
Expand Down Expand Up @@ -1200,6 +1206,21 @@ will be used as the character encoding for this function by default.</simpara></
</entry>
</row>'>

<!ENTITY mbstring.errors.encoding-invalid '<para xmlns="http://docbook.org/ns/docbook">
从 PHP 8.0.0 起,如果 <parameter>encoding</parameter> 是无效编码,
则会抛出 <exceptionname>ValueError</exceptionname>。
在 PHP 8.0.0 之前,会发出 <constant>E_WARNING</constant>。
</para>'>

<!ENTITY mbstring.changelog.encoding-invalid '<row xmlns="http://docbook.org/ns/docbook">
<entry>8.0.0</entry>
<entry>
现在,如果 <parameter>encoding</parameter> 是无效编码,
会抛出 <exceptionname>ValueError</exceptionname>。
以前会发出 <constant>E_WARNING</constant> 并返回 &false;。
</entry>
</row>'>

<!-- mcrypt notes -->

<!ENTITY mcrypt.parameter.cipher '<simpara xmlns="http://docbook.org/ns/docbook"><constant>MCRYPT_ciphername</constant> 常量中的一个,或者是字符串值的算法名称。</simpara>'>
Expand Down Expand Up @@ -2247,11 +2268,6 @@ xattr 默认在 user 命名空间上操作,但可使用
<!ENTITY tidy.object 'The <classname xmlns="http://docbook.org/ns/docbook">Tidy</classname> 对象。'>

<!-- Snippets for the installation section -->
<!ENTITY warn.apache2.compat '<warning xmlns="http://docbook.org/ns/docbook"><simpara>不推荐在使用 Apache 2
的产品中使用线程化 MPM。应使用预分支 MPM,Apache 2.0 和 2.2
默认的 MPM。其原因见 FAQ 中的相关条目<link linkend="faq.installation.apache2">使用线程化 MPM 的
Apache2</link>。</simpara></warning>'>

<!ENTITY warn.install.third-party-support '<warning xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<simpara>
第三方提供的版本被视为非官方版本,不直接受 PHP 项目支持。
Expand Down Expand Up @@ -4503,6 +4519,29 @@ xmlns="http://docbook.org/ns/docbook"><simpara>This function has been
</simpara>
'>

<!-- Sodium -->
<!ENTITY sodium.changelog.aes256gcm-aarch64 '
<informaltable xmlns="http://docbook.org/ns/docbook">
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
此函数现在也在 aarch64 上定义。
以前仅在 x86 和 x86_64 上定义。
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
'>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
52 changes: 27 additions & 25 deletions reference/filesystem/ini.xml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 36d8d80891c1dfc49dacecccc7d43b7fe6a6bb89 Maintainer: jhdxr Status: ready -->
<!-- EN-Revision: 9e5166dc6a5ff650b649298470d19eb7c3637a63 Maintainer: jhdxr Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<section xml:id="filesystem.configuration" xmlns="http://docbook.org/ns/docbook">
&reftitle.runtime;
Expand Down Expand Up @@ -28,7 +28,7 @@
<entry><link linkend="ini.allow-url-include">allow_url_include</link></entry>
<entry>"0"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry>自 PHP 7.4.0 起废弃。</entry>
<entry>自 PHP 7.4.0 起弃用。</entry>
</row>
<row>
<entry><link linkend="ini.user-agent">user_agent</link></entry>
Expand Down Expand Up @@ -76,10 +76,10 @@
</term>
<listitem>
<para>
本选项激活了 URL 形式的 fopen 封装协议使得可以访问 URL
对象例如文件。默认的封装协议提供用 ftp http 协议来访问<link
linkend="features.remote-files">远程文件</link>,一些扩展库例如
<link linkend="ref.zlib">zlib</link> 可能会注册更多的封装协议
此选项启用可感知 URL fopen 封装协议,从而可以像访问文件一样访问 URL
对象。默认封装协议支持通过 ftp http 协议访问
<link linkend="features.remote-files">远程文件</link>,某些扩展(例如
<link linkend="ref.zlib">zlib</link>)可能会注册其他封装协议
</para>
</listitem>
</varlistentry>
Expand All @@ -91,13 +91,13 @@
</term>
<listitem>
<para>
This option allows the use of URL-aware fopen wrappers with the following
functions: <function>include</function>, <function>include_once</function>,
<function>require</function>, <function>require_once</function>.
此选项允许以下函数使用可感知 URLfopen 封装协议:
<function>include</function><function>include_once</function>
<function>require</function><function>require_once</function>
</para>
<note>
<para>
这个设置项需要开启 allow_url_fopen
此设置要求启用 allow_url_fopen。
</para>
</note>
</listitem>
Expand All @@ -122,7 +122,7 @@
</term>
<listitem>
<para>
指定基于 socket 的流的默认超时时间(秒)。指定一个负值意味着不会超时
基于 socket 的流的默认超时时间(秒)。指定负值表示永不超时
</para>
</listitem>
</varlistentry>
Expand All @@ -134,9 +134,8 @@
</term>
<listitem>
<para>
这个 email 地址在使用 ftp 封装器的时候用于未认证的 FTP
连接,在使用 http 封装器的时候用于 HTTP 连接的消息头中的
From 字段。
使用 ftp 和 http 封装协议时,此电子邮件地址分别用于未经身份验证的 FTP
连接,以及 HTTP 连接的 From 标头值。
</para>
</listitem>
</varlistentry>
Expand All @@ -147,17 +146,20 @@
<type>bool</type>
</term>
<listitem>
<para>
当设为 On 时,PHP 将检查通过
<function>fgets</function> 和 <function>file</function>
取得的数据中的行结束符号是符合 Unix,MS-DOS,还是 Macintosh 的习惯。
</para>
<para>
这使得 PHP 可以和 Macintosh 系统交互操作,但是默认值是
Off,因为在检测第一行的
EOL 习惯时会有很小的性能损失,而且在 Unix
系统下使用回车符号作为项目分隔符的人们会遭遇向下不兼容的行为。
</para>
<simpara>
启用后,PHP 会检查 <function>fgets</function> 和
<function>file</function> 读取的数据,判断其使用 Unix、MS-DOS
还是 Macintosh 的行结束符约定。
</simpara>
<simpara>这使 PHP 能够与 Macintosh 系统互操作,但默认值为 Off,
因为检测第一行的 EOL 约定会产生很小的性能开销;此外,在 Unix
系统上使用回车符作为项目分隔符的用户会遇到不向后兼容的行为。
</simpara>
<warning>
<simpara>
此选项自 PHP 8.1.0 起弃用。
</simpara>
</warning>
</listitem>
</varlistentry>

Expand Down
136 changes: 136 additions & 0 deletions reference/mbstring/functions/mb-encoding-aliases.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 8465ca6ec4bbcf79583ecd057860164dd9c7e385 Maintainer: daijie Status: ready -->
<refentry xml:id="function.mb-encoding-aliases" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>mb_encoding_aliases</refname>
<refpurpose>获取已知编码类型的别名</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>mb_encoding_aliases</methodname>
<methodparam><type>string</type><parameter>encoding</parameter></methodparam>
</methodsynopsis>
<para>
返回已知 <parameter>encoding</parameter> 类型的别名数组。
</para>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>encoding</parameter></term>
<listitem>
<para>
要检查其别名的编码类型。
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
返回以数字为索引的编码别名数组。
</para>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
&mbstring.errors.encoding-invalid;
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&mbstring.changelog.encoding-invalid;
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>mb_encoding_aliases</function> 示例</title>
<programlisting role="php">
<![CDATA[
<?php
$encoding = 'ASCII';
$known_encodings = mb_list_encodings();

if (in_array($encoding, $known_encodings)) {

$aliases = mb_encoding_aliases($encoding);
print_r($aliases);

} else {

echo "Unknown ($encoding) encoding.\n";

}
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
Array
(
[0] => ANSI_X3.4-1968
[1] => iso-ir-6
[2] => ANSI_X3.4-1986
[3] => ISO_646.irv:1991
[4] => US-ASCII
[5] => ISO646-US
[6] => us
[7] => IBM367
[8] => cp367
[9] => csASCII
)
]]>
</screen>
</example>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>mb_list_encodings</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
13 changes: 3 additions & 10 deletions reference/mbstring/functions/mb-internal-encoding.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 5b3fc18be040c1d552da1497415b20296163012f Maintainer: daijie Status: ready -->
<!-- EN-Revision: 8465ca6ec4bbcf79583ecd057860164dd9c7e385 Maintainer: daijie Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<refentry xml:id="function.mb-internal-encoding" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand Down Expand Up @@ -47,9 +47,7 @@

<refsect1 role="errors">
&reftitle.errors;
<para>
从 PHP 8.0.0 起,如果 <parameter>encoding</parameter> 的值是无效编码,则会抛出 <classname>ValueError</classname>。在 PHP 8.0.0 之前,会发出 <constant>E_WARNING</constant>。
</para>
&mbstring.errors.encoding-invalid;
</refsect1>

<refsect1 role="changelog">
Expand All @@ -64,12 +62,7 @@
</thead>
<tbody>
&mbstring.changelog.encoding-nullable;
<row>
<entry>8.0.0</entry>
<entry>
如果 <parameter>encoding</parameter> 是无效编码,现在抛出 <classname>ValueError</classname>。以前发出的是 <constant>E_WARNING</constant>。
</entry>
</row>
&mbstring.changelog.encoding-invalid;
</tbody>
</tgroup>
</informaltable>
Expand Down
Loading
Loading