Skip to content

Commit

Permalink
Update outcontrol/var/mail/appendices
Browse files Browse the repository at this point in the history
  • Loading branch information
mowangjuanzi committed Jan 25, 2024
1 parent 22c9982 commit 1472c01
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 131 deletions.
2 changes: 1 addition & 1 deletion appendices/migration72/new-functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
</sect2>

<sect2 xml:id="migration72.new-functions.mbstring">
<title><link linkend="book.mbstring">Multibyte String</link></title>
<title><link linkend="book.mbstring">多字节字符串</link></title>

<itemizedlist>
<listitem>
Expand Down
107 changes: 38 additions & 69 deletions appendices/migration73/other-changes.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: 97c4cc92207255ea09308d2646441dd61448d924 Maintainer: avenger Status: partial -->
<!-- EN-Revision: 97c4cc92207255ea09308d2646441dd61448d924 Maintainer: avenger Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<sect1 xml:id="migration73.other-changes" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>其它变更</title>
Expand Down Expand Up @@ -122,171 +122,140 @@
<title>数据过滤</title>

<para>
<constant>FILTER_VALIDATE_FLOAT</constant> now also supports a <literal>thousand</literal>
option, which defines the set of allowed thousand separator chars. The default
(<code>"',."</code>) is fully backward compatible with former PHP versions.
<constant>FILTER_VALIDATE_FLOAT</constant> 现在还支持 <literal>thousand</literal>
选项,该选项定义允许的千位分隔符集合。默认值(<code>"',."</code>)与以前的 PHP 版本完全向后兼容。
</para>

<para>
<constant>FILTER_SANITIZE_ADD_SLASHES</constant> has been added as an alias of the
<literal>magic_quotes</literal> filter (<constant>FILTER_SANITIZE_MAGIC_QUOTES</constant>).
The <literal>magic_quotes</literal> filter is subject to removal in future versions of PHP.
<constant>FILTER_SANITIZE_ADD_SLASHES</constant> 已添加为 <literal>magic_quotes</literal>
过滤器(<constant>FILTER_SANITIZE_MAGIC_QUOTES</constant>)的别名。 <literal>magic_quotes</literal>
过滤器可能会在未来的 PHP 版本中移除。
</para>
</sect2>

<sect2 xml:id="migration73.other-changes.ftp">
<title>FTP</title>

<para>
The default transfer mode has been changed to <literal>binary</literal>.
默认传输模式已更改为 <literal>binary</literal>
</para>
</sect2>

<sect2 xml:id="migration73.other-changes.intl">
<title>国际化相关函数</title>

<para>
<constant>Normalizer::NONE</constant> is deprecated, when PHP is linked with
ICU ≥ 56.
当 PHP 链接到 ICU ≥ 56 时,<constant>Normalizer::NONE</constant> 已弃用。
</para>

<para>
Introduced <constant>Normalizer::FORM_KC_CF</constant> as
<methodname>Normalizer::normalize</methodname> argument for
<literal>NFKC_Casefold</literal> normalization; available when linked with
ICU ≥ 56.
引入了 <constant>Normalizer::FORM_KC_CF</constant> 作为 <literal>NFKC_Casefold</literal> 标准化的
<methodname>Normalizer::normalize</methodname> 参数;当与 ICU ≥ 56 链接时可用。
</para>
</sect2>

<sect2 xml:id="migration73.other-changes.json">
<title>JavaScript Object Notation</title>
<title>JavaScript 对象表示法</title>

<para>
A new flag has been added, <constant>JSON_THROW_ON_ERROR</constant>, which
can be used with <function>json_decode</function> or
<function>json_encode</function> and causes these functions to throw the new
<classname>JsonException</classname> upon an error, instead of setting the
global error state that is retrieved with
<function>json_last_error</function> and <function>json_last_error_msg</function>.
<constant>JSON_PARTIAL_OUTPUT_ON_ERROR</constant> takes precedence over
<constant>JSON_THROW_ON_ERROR</constant>.
添加了新 <constant>JSON_THROW_ON_ERROR</constant> flag,可以与 <function>json_decode</function> 或 <function>json_encode</function>
一起使用,并导致这些函数在发生错误时抛出新的 <classname>JsonException</classname>,而不是使用 <function>json_last_error</function> 和
<function>json_last_error_msg</function> 检索全局错误状态。<constant>JSON_PARTIAL_OUTPUT_ON_ERROR</constant> 优先于
<constant>JSON_THROW_ON_ERROR</constant>。
</para>
</sect2>

<sect2 xml:id="migration73.other-changes.mbstring">
<title>Multibyte String</title>
<title>多字节字符串</title>

<para>
The configuration option <option role="configure">--with-libmbfl</option> is
no longer available.
配置项 <option role="configure">--with-libmbfl</option> 不再可用。
</para>
</sect2>

<sect2 xml:id="migration73.other-changes.uodbc">
<title>ODBC (Unified)</title>

<para>
Support for <literal>ODBCRouter</literal> and <literal>Birdstep</literal>
including the <literal>birdstep.max_links</literal> ini directive has been
removed.
已移除对 <literal>ODBCRouter</literal> 和 <literal>Birdstep</literal> 的支持(包括 <literal>birdstep.max_links</literal> ini 指令)。
</para>
</sect2>

<sect2 xml:id="migration73.other-changes.opcache">
<title>OPcache</title>

<para>
The <literal>opcache.inherited_hack</literal> ini directive has been removed.
The value has already been ignored since PHP 5.3.0.
<literal>opcache.inherited_hack</literal> ini 指令已移除。自 PHP 5.3.0 起,已忽略该值。
</para>
</sect2>

<sect2 xml:id="migration73.other-changes.openssl">
<title>OpenSSL</title>

<para>
The <literal>min_proto_version</literal> and <literal>max_proto_version</literal>
ssl stream options as well as related constants for possible TLS protocol values
have been added.
添加了 <literal>min_proto_version</literal> 和 <literal>max_proto_version</literal> ssl stream 选项以及可能的 TLS 协议值的相关常量。
</para>
</sect2>

<sect2 xml:id="migration73.other-changes.pcre">
<title>Regular Expressions (Perl-Compatible)</title>
<title>正则表达式(Perl 兼容)</title>

<para>
The <link linkend="book.pcre">PCRE extension</link> has been upgraded to
PCRE2, which may cause minor behavioral changes (for instance, character
ranges in classes are now more strictly interpreted), and augments the
existing regular expression syntax.
<link linkend="book.pcre">PCRE 扩展</link>已升级到 PCRE2,这可能会导致出现细微的行为变化(例如,现在对类中的字符范围进行更严格的解释),并增强了现有的正则表达式语法。
</para>

<para>
<function>preg_quote</function> now also escapes the <literal>'#'</literal>
character.
<function>preg_quote</function> 现在也转义 <literal>'#'</literal> 字符。
</para>
</sect2>

<sect2 xml:id="migration73.other-changes.pdo-dblib">
<title>Microsoft SQL Server and Sybase Functions (PDO_DBLIB)</title>
<title>Microsoft SQL Server Sybase 函数(PDO_DBLIB</title>

<para>
The attribute <constant>PDO::DBLIB_ATTR_SKIP_EMPTY_ROWSETS</constant> to enable automatic
skipping of empty rowsets has been added.
添加了属性 <constant>PDO::DBLIB_ATTR_SKIP_EMPTY_ROWSETS</constant> 以启用自动跳过 rowset。
</para>

<para>
The <constant>PDO::DBLIB_ATTR_TDS_VERSION</constant> attribute which exposes
the TDS version has been added.
添加了公开 TDS 版本的 <constant>PDO::DBLIB_ATTR_TDS_VERSION</constant> 属性。
</para>

<para>
DATETIME2 columns are now treated like DATETIME columns.
DATETIME2 列现在被视为 DATETIME 列。
</para>
</sect2>

<sect2 xml:id="migration73.other-changes.pdo-sqlite">
<title>SQLite Functions (PDO_SQLITE)</title>
<title>SQLite 函数(PDO_SQLITE</title>

<para>
SQLite3 databases can now be opened in read-only mode by setting the
new <constant>PDO::SQLITE_ATTR_OPEN_FLAGS</constant> attribute to
<constant>PDO::SQLITE_OPEN_READONLY</constant>.
现在可以通过将新的 <constant>PDO::SQLITE_ATTR_OPEN_FLAGS</constant> 属性设置 <constant>PDO::SQLITE_OPEN_READONLY</constant> 以只读模式打开 SQLite3 数据库。
</para>
</sect2>

<sect2 xml:id="migration73.other-changes.session">
<title>Session Handling</title>
<title>Session 处理</title>

<para>
<function>session_set_cookie_params</function> now also supports the
following signature:
<function>session_set_cookie_params</function> 现在还支持以下签名:
<methodsynopsis>
<type>bool</type><methodname>session_set_cookie_params</methodname>
<methodparam><type>array</type><parameter>options</parameter></methodparam>
</methodsynopsis>
where <literal>$options</literal> is an associative array which may have
any of the keys <literal>"lifetime"</literal>, <literal>"path"</literal>,
<literal>"domain"</literal>, <literal>"secure"</literal>,
<literal>"httponly"</literal> and <literal>"samesite"</literal>. Accordingly,
the return value of <function>session_get_cookie_params</function> now also
has an element with the key <literal>"samesite"</literal>.
Furthermore, the new <literal>session.cookie_samesite</literal> ini option to
set the default of the SameSite directive for cookies has been added. It
defaults to <literal>""</literal> (empty string), so no SameSite directive is
set. Can be set to <literal>"Lax"</literal> or <literal>"Strict"</literal>,
which sets the respective SameSite directive.
其中 <literal>$options</literal> 是关联数组,可以存在以下任意 key
<literal>"lifetime"</literal>、<literal>"path"</literal>、<literal>"domain"</literal>、<literal>"secure"</literal>、<literal>"httponly"</literal>
和 <literal>"samesite"</literal>。因此,<function>session_get_cookie_params</function> 的返回值现在也有带有 <literal>"samesite"</literal> key
的元素。此外,还添加了新的 <literal>session.cookie_samesite</literal> ini 选项来设置 cookie 的 SameSite 指令的默认值。默认为 <literal>""</literal>(空字符串),因此未设置
SameSite 指令。可以设置为 <literal>"Lax"</literal> 或 <literal>"Strict"</literal>,这会设置相应的 SameSite 指令。
</para>
</sect2>

<sect2 xml:id="migration73.other-changes.tidy">
<title>Tidy</title>

<para>
Building against <link xlink:href="&url.tidyp;">tidyp</link> is now also
supported transparently. Since tidyp offers no API to get the release date,
<function>tidy_get_release</function> and <methodname>tidy::getRelease</methodname>
return <literal>'unknown'</literal> in this case.
现在也透明地支持针对 <link xlink:href="&url.tidyp;">tidyp</link> 进行编译。由于 tidyp 没有提供 API 来获取发布日期,因此
<function>tidy_get_release</function> 和 <methodname>tidy::getRelease</methodname> 在这种情况下返回 <literal>'unknown'</literal>。
</para>
</sect2>

Expand Down
4 changes: 2 additions & 2 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: fe11910e25e7eba44959bd347ba946ffc4d56934 Maintainer: Gregory Status: ready -->
<!-- EN-Revision: 960a6ac3b1c21d95ce317acf248002129618efd9 Maintainer: Gregory Status: ready -->
<!-- CREDITS: dallas, mowangjuanzi, Luffy -->
<!-- 请保持此文件与英文文件中相应的每个 ENTITY 行号一一对应以便于对照,修改与更新! -->

Expand Down Expand Up @@ -3368,7 +3368,7 @@ local: {
</row>
<row>
<entry>queryType</entry>
<entry><type>int</type></entry>
<entry><type>string</type></entry>
<entry>
<para>
The query type for evaluating queries with indexed, encrypted
Expand Down
46 changes: 14 additions & 32 deletions reference/mail/functions/mail.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: 0c9c2dd669fe9395eaa73d487fbd160f9057429a Maintainer: HonestQiao Status: partial -->
<!-- EN-Revision: d43f29f6a628996d1b7c3be487dcff39450146bf Maintainer: HonestQiao Status: partial -->
<!-- CREDITS: mowangjuanzi -->
<refentry xml:id="function.mail" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand Down Expand Up @@ -85,55 +85,37 @@ $text = str_replace("\n.", "\n..", $text);
<term><parameter>additional_headers</parameter>(可选项)</term>
<listitem>
<para>
<type>String</type> or <type>array</type> to be inserted at the end of the email header.
要插入到邮件 header 尾部的 <type>String</type> <type>array</type>
</para>
<para>
This is typically used to add extra headers (From, Cc, and Bcc).
Multiple extra headers should be separated with a CRLF (\r\n).
If outside data are used to compose this header, the data should be sanitized
so that no unwanted headers could be injected.
这通常用于添加额外的 header(From、Cc 和 Bcc)。多个额外的 header 应使用
CRLF(\r\n)分隔。如果使用外部数据来组成此 header,则应对数据进行清理,避免注入不需要的 header。
</para>
<para>
If an <type>array</type> is passed, its keys are the header names and its
values are the respective header values.
如果传递 <type>array</type>,则 key 是 header 名称,value 对应的 header 值。
</para>
<note>
<para>
Before PHP 5.4.42 and 5.5.27, repectively, <parameter>additional_headers</parameter> did not have mail header
injection protection. Therefore, users must make sure specified headers
are safe and contains headers only. i.e. Never start mail body by putting
multiple newlines.
</para>
</note>
<note>
<para>
When sending mail, the mail <emphasis>must</emphasis> contain
a <literal>From</literal> header. This can be set with the
<parameter>additional_headers</parameter> parameter, or a default
can be set in &php.ini;.
发送邮件时,邮件<emphasis>必须</emphasis>包含 <literal>From</literal> header。这可以使用
<parameter>additional_headers</parameter> 参数来设置,或者可以在 &php.ini; 中设置默认值。
</para>
<para>
Failing to do this will result in an error
message similar to <literal>Warning: mail(): "sendmail_from" not
set in php.ini or custom "From:" header missing</literal>.
The <literal>From</literal> header sets also
<literal>Return-Path</literal> when sending directly via SMTP (Windows only).
如果不这样做,将导致类似于 <literal>Warning: mail(): "sendmail_from" not
set in php.ini or custom "From:" header missing</literal> 的错误消息。当直接通过 SMTP(仅限
Windows)发送时,<literal>From</literal> header 还会设置 <literal>Return-Path</literal>。
</para>
</note>
<note>
<para>
If messages are not received, try using a LF (\n) only.
Some Unix mail transfer agents (most notably
<link xlink:href="&url.qmail;">qmail</link>) replace LF by CRLF
automatically (which leads to doubling CR if CRLF is used).
This should be a last resort, as it does not comply with
<link xlink:href="&url.rfc;2822">RFC 2822</link>.
如果未收到消息,请尝试仅使用 LF(\n)。一些 Unix 邮件传输代理(最著名的是 <link
xlink:href="&url.qmail;">qmail</link>)会自动用 CRLF 替换 LF(如果使用 CRLF,则会导致 CR
重复)。这应该是最后的手段,因为它不符合 <link xlink:href="&url.rfc;2822">RFC 2822</link>。
</para>
</note>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>additional_params</parameter> (optional)</term>
<term><parameter>additional_params</parameter>(可选)</term>
<listitem>
<para>
The <parameter>additional_params</parameter> parameter
Expand Down
6 changes: 4 additions & 2 deletions reference/outcontrol/book.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: 95bdd6883b5dde9504701777ba81b3c5f15df52b Maintainer: mowangjuanzi Status: ready -->
<!-- EN-Revision: 7610e990293c87168d026ad078d8272e643e2c23 Maintainer: mowangjuanzi Status: ready -->
<book xml:id="book.outcontrol" xmlns="http://docbook.org/ns/docbook">
<?phpdoc extension-membership="core" ?>
<title>输出缓冲控制</title>
Expand All @@ -17,9 +17,11 @@

&reference.outcontrol.setup;
&reference.outcontrol.constants;
&reference.outcontrol.output-buffering;
&reference.outcontrol.flushing-system-buffers;
&reference.outcontrol.user-level-output-buffers;
&reference.outcontrol.examples;
&reference.outcontrol.reference;

</book>

<!-- Keep this comment at the end of the file
Expand Down
14 changes: 12 additions & 2 deletions reference/outcontrol/functions/ob-implicit-flush.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: cdc9d28d334bbc08386fecf8aade66080004a9dd Maintainer: mowangjuanzi Status: ready -->
<!-- EN-Revision: 1cdb6d04aa0d5c15c73337d0dca75d67e0f2e48e Maintainer: mowangjuanzi Status: ready -->
<!-- CREDITS: Luffy -->
<refentry xml:id="function.ob-implicit-flush" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand All @@ -15,8 +15,18 @@
<methodparam choice="opt"><type>bool</type><parameter>enable</parameter><initializer>&true;</initializer></methodparam>
</methodsynopsis>
<para>
<function>ob_implicit_flush</function> 将打开或关闭绝对(隐式)刷送。绝对(隐式)刷送将导致在每次输出调用后有一次刷送操作,以便不再需要对 <function>flush</function> 的显式调用
<function>ob_implicit_flush</function> 将打开或关闭绝对(隐式)刷送。绝对(隐式)刷送将在每个代码块产生输出后执行刷新操作,以便不再手动调用 <function>flush</function>。
</para>
<note>
<simpara>
打印空字符串或发送 header 不会视为输出,因此不会产生刷新操作。
</simpara>
</note>
<note>
<simpara>
此函数对用户级输出处理程序(例如由 <function>ob_start</function> 或 <function>output_add_rewrite_var</function> 启动的处理程序)没有任何影响。
</simpara>
</note>
</refsect1>

<refsect1 role="parameters">
Expand Down
Loading

0 comments on commit 1472c01

Please sign in to comment.