Skip to content

Commit

Permalink
Update outcontrol/appendices/sqlite3
Browse files Browse the repository at this point in the history
  • Loading branch information
mowangjuanzi committed Jan 24, 2024
1 parent e44fdd5 commit 22c9982
Show file tree
Hide file tree
Showing 13 changed files with 94 additions and 82 deletions.
53 changes: 22 additions & 31 deletions appendices/migration73/other-changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,16 @@
<title>Set(raw)cookie 函数接受 $option 数组参数</title>

<para>
<function>setcookie</function> and <function>setrawcookie</function> now also
support the following signature:
<function>setcookie</function> 和 <function>setrawcookie</function> 现在还支持以下签名:
<methodsynopsis>
<type>bool</type><methodname>setcookie</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>value</parameter><initializer>""</initializer></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter><initializer>[]</initializer></methodparam>
</methodsynopsis>
where <literal>$options</literal> is an associative array which may have
any of the keys <literal>"expires"</literal>, <literal>"path"</literal>,
<literal>"domain"</literal>, <literal>"secure"</literal>,
<literal>"httponly"</literal> and <literal>"samesite"</literal>.
<literal>$options</literal> 是关联数组,可以存在以下任意 key
<literal>"expires"</literal>、<literal>"path"</literal>、<literal>"domain"</literal>、<literal>"secure"</literal>、<literal>"httponly"</literal>
和 <literal>"samesite"</literal>。
</para>
</sect3>

Expand Down Expand Up @@ -78,21 +76,18 @@
<title>其它</title>

<para>
<function>var_export</function> now exports <classname>stdClass</classname>
objects as an array cast to an object (<code>(object) array( ... )</code>), rather
than using the nonexistent method <methodname>stdClass::__setState</methodname>.
<function>var_export</function> 现在导出 <classname>stdClass</classname>
为数组转换为对象(<code>(object) array( ... )</code>),而不是使用不存在的方法
<methodname>stdClass::__setState</methodname>
</para>

<para>
<function>debug_zval_dump</function> was changed to display recursive arrays
and objects in the same way as <function>var_dump</function>. Now, it doesn't
display them twice.
<function>debug_zval_dump</function> 已变更为跟 <function>var_dump</function>
一样的方式显示递归数组和对象。现在,不会重复展示两次了。
</para>

<para>
<function>array_push</function> and <function>array_unshift</function> can
now also be called with a single argument, which is particularly convenient
wrt. the spread operator.
<function>array_push</function> 和 <function>array_unshift</function> 现在也可以使用单个参数调用,这对于展开运算符来说尤其方便。
</para>
</sect3>

Expand All @@ -102,9 +97,8 @@
<title>交互式 PHP 调试程序</title>

<para>
The unused constants <constant>PHPDBG_FILE</constant>,
<constant>PHPDBG_METHOD</constant>, <constant>PHPDBG_LINENO</constant> and
<constant>PHPDBG_FUNC</constant> have been removed.
已移除未使用的常量 <constant>PHPDBG_FILE</constant>、<constant>PHPDBG_METHOD</constant>、<constant>PHPDBG_LINENO</constant>
和 <constant>PHPDBG_FUNC</constant>。
</para>
</sect2>

Expand All @@ -117,15 +111,15 @@
</sect2>

<sect2 xml:id="migration73.other-changes.curl">
<title>Client URL Library</title>
<title>客户端 URL </title>

<para>
libcurl ≥ 7.15.5 is now required.
现在需要 libcurl ≥ 7.15.5
</para>
</sect2>

<sect2 xml:id="migration73.other-changes.filter">
<title>Data Filtering</title>
<title>数据过滤</title>

<para>
<constant>FILTER_VALIDATE_FLOAT</constant> now also supports a <literal>thousand</literal>
Expand Down Expand Up @@ -297,31 +291,28 @@
</sect2>

<sect2 xml:id="migration73.other-changes.xml">
<title>XML Parser</title>
<title>XML 解析器</title>

<para>
The return value of the <function>xml_set_external_entity_ref_handler</function>
callback is no longer ignored if the extension has been built against libxml.
Formerly, the return value has been ignored, and parsing did never stop.
如果扩展是针对 libxml 编译,则不再忽略 <function>xml_set_external_entity_ref_handler</function>
回调的返回值。以前,会忽略返回值,并且不会停止解析。
</para>
</sect2>

<sect2 xml:id="migration73.other-changes.zip">
<title>Zip</title>

<para>
Building against the bundled libzip is discouraged, but still possible by
adding <option role="configure">--without-libzip</option> to the configuration.
不建议针对捆绑的 libzip 进行编译,但通过在配置中添加 <option role="configure">--without-libzip</option> 仍然可以实现。
</para>
</sect2>

<sect2 xml:id="migration73.other-changes.zlib">
<title>Zlib Compression</title>
<title>Zlib 压缩</title>

<para>
The zlib/level context option for the <link
linkend="wrappers.compression">compress.zlib wrapper</link> to facilitate
setting the desired compression level has been added.
<link linkend="wrappers.compression">compress.zlib 包装器</link>添加了 zlib/level
上下文选项,以方便设置所需的压缩级别。
</para>
</sect2>

Expand Down
10 changes: 3 additions & 7 deletions appendices/migration73/windows-support.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 204f2c1c884b6943f4838e7a3398c03a30035a20 Maintainer: avenger Status: ready -->
<!-- Reviewed: no -->

<!-- CREDITS: mowangjuanzi -->
<sect1 xml:id="migration73.windows-support" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Windows 支持</title>

Expand All @@ -13,11 +12,8 @@
<title>更符合 POSIX 标准的文件删除方法</title>

<para>
File descriptors are opened in shared read/write/delete mode by default.
This effectively maps the <abbrev>POSIX</abbrev> semantics and allows to
delete files with handles in use. It is not 100% same, some platform
differences still persist. After the deletion, the filename entry is
blocked, until all the opened handles to it are closed.
文件描述符默认以共享读/写/删除模式打开。这有效地映射了 <abbrev>POSIX</abbrev>
语义,并允许在使用句柄时删除文件。它不完全相同,一些平台差异仍然存在。在删除之后,将阻塞文件名条目,直到所有打开的句柄都已关闭。
</para>
</sect3>

Expand Down
2 changes: 1 addition & 1 deletion appendices/migration74/incompatible.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: 68dfe9740823ed1d229e5e79b7018fe71237c665 Maintainer: Avenger Status: ready -->
<!-- EN-Revision: c308ed37a98decb1959ed47dc149a43d6c71ec60 Maintainer: Avenger Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<sect1 xml:id="migration74.incompatible" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>不向后兼容的变更</title>
Expand Down
2 changes: 1 addition & 1 deletion faq/com.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- EN-Revision: 2bb07c8c43f028c665a33bfc08a22639e9e35dc6 Maintainer: mowangjuanzi Status: ready -->
<chapter xml:id="faq.com" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>PHP 和 COM</title>
<titleabbrev>PHP and COM</titleabbrev>
<titleabbrev>PHP COM</titleabbrev>

<para>
PHP 可以在 Win32 平台中访问 COM 和 DCOM 对象。
Expand Down
2 changes: 1 addition & 1 deletion faq/databases.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- CREDITS: mowangjuanzi -->
<chapter xml:id="faq.databases" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>数据库问题</title>
<titleabbrev>Database issues</titleabbrev>
<titleabbrev>数据库问题</titleabbrev>

<para>
本节包括 PHP 和数据库之间关系的常见问题。事实上,PHP 可以访问如今现有的任何数据库。
Expand Down
2 changes: 1 addition & 1 deletion faq/general.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- CREDITS: mowangjuanzi -->
<chapter xml:id="faq.general" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>一般信息</title>
<titleabbrev>General Information</titleabbrev>
<titleabbrev>一般信息</titleabbrev>

<para>
本章包括了有关 PHP 的大多数一般问题:它是什么和它做什么。
Expand Down
2 changes: 1 addition & 1 deletion faq/html.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- EN-Revision: 8b647de71ab443cb2784a82902bfc87728d587ae Maintainer: mowangjuanzi Status: ready -->
<chapter xml:id="faq.html" xmlns="http://docbook.org/ns/docbook">
<title>PHP 和 HTML</title>
<titleabbrev>PHP and HTML</titleabbrev>
<titleabbrev>PHP HTML</titleabbrev>

<para>
PHP 和 HTML 有很多相互作用:PHP 能生成 HTML,HTML 可以向 PHP
Expand Down
2 changes: 1 addition & 1 deletion faq/obtaining.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- CREDITS: mowangjuanzi -->
<chapter xml:id="faq.obtaining" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>获取 PHP</title>
<titleabbrev>Obtaining PHP</titleabbrev>
<titleabbrev>获取 PHP</titleabbrev>

<para>
本章包括 PHP 下载地址以及操作系统相关问题的详细资料。
Expand Down
2 changes: 1 addition & 1 deletion faq/passwords.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- CREDITS: mowangjuanzi -->
<chapter xml:id="faq.passwords" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>密码散列安全</title>
<titleabbrev>Password Hashing</titleabbrev>
<titleabbrev>密码散列</titleabbrev>

<para>
本部分解释使用散列函数对密码进行安全处理背后的原因,以及如何有效的进行密码散列处理。
Expand Down
43 changes: 25 additions & 18 deletions reference/outcontrol/functions/ob-get-clean.xml
Original file line number Diff line number Diff line change
@@ -1,42 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 6ab6ea465889620fc2a8cdaf7b008cbaed83c523 Maintainer: mowangjuanzi Status: ready -->
<!-- EN-Revision: 86b976d5afaf037868174fe5c242e886eb69baa4 Maintainer: mowangjuanzi Status: ready -->
<refentry xml:id="function.ob-get-clean" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>ob_get_clean</refname>
<refpurpose>得到当前缓冲区的内容并删除当前输出缓冲区</refpurpose>
<refpurpose>获取活动缓冲区的内容并将其关闭</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>string</type><type>false</type></type><methodname>ob_get_clean</methodname>
<void/>
</methodsynopsis>
<para>
得到当前缓冲区的内容并删除当前输出缓冲区。
该函数调用输出处理程序(使用 <constant>PHP_OUTPUT_HANDLER_CLEAN</constant> 和 <constant>PHP_OUTPUT_HANDLER_FINAL</constant>
flag),丢弃其返回值,返回活动输出缓冲区的内容并关闭活动输出缓冲区。
</para>
<para>
<function>ob_get_clean</function> 实质上是一起执行了
<function>ob_get_contents</function> 和
<function>ob_end_clean</function>。
如果没有以 <constant>PHP_OUTPUT_HANDLER_REMOVABLE</constant> flag 启动的活动输出缓冲区,<function>ob_get_clean</function> 将失败。
</para>
<para>
输出缓冲区必须由带有 <link linkend="constant.php-output-handler-cleanable">PHP_OUTPUT_HANDLER_CLEANABLE</link>
和 <link linkend="constant.php-output-handler-removable">PHP_OUTPUT_HANDLER_REMOVABLE</link> flag
的 <function>ob_start</function> 启动。否则 <function>ob_get_clean</function> 将不起作用。
<function>ob_get_clean</function> 将丢弃活动输出缓冲区的内容,即使是在没有 <constant>PHP_OUTPUT_HANDLER_CLEANABLE</constant> flag 的情况下启动的。
</para>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
返回输出缓冲区的内容,并结束输出缓冲区。如果输出缓冲区不是活跃的,即返回 &false;
成功时返回活动输出缓冲区的内容,失败时返回 &false;
</para>
<caution>
<simpara>
如果没有活动输出缓冲区,<function>ob_get_clean</function> 将返回 false,但不会生成 <constant>E_NOTICE</constant>。
</simpara>
</caution>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<para>
如果函数失败生成 <constant>E_NOTICE</constant>。
</para>
</refsect1>

Expand Down Expand Up @@ -76,11 +80,14 @@ string(11) "hello world"
&reftitle.seealso;
<para>
<simplelist>
<member><function>ob_get_contents</function></member>
<member><function>ob_start</function></member>
<member><function>ob_get_contents</function></member>
<member><function>ob_clean</function></member>
<member><function>ob_end_clean</function></member>
<member><function>ob_get_flush</function></member>
</simplelist>
</para>
</refsect1>
</refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Expand Down
41 changes: 25 additions & 16 deletions reference/outcontrol/functions/ob-get-flush.xml
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 6ab6ea465889620fc2a8cdaf7b008cbaed83c523 Maintainer: mowangjuanzi Status: ready -->
<!-- EN-Revision: 86b976d5afaf037868174fe5c242e886eb69baa4 Maintainer: mowangjuanzi Status: ready -->
<refentry xml:id="function.ob-get-flush" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>ob_get_flush</refname>
<refpurpose>刷新输出缓冲区,将其作为字符串返回并关闭输出缓冲区</refpurpose>
<refpurpose>
冲刷(发送)活动输出处理程序的返回值,返回活动输出缓冲区的内容并将其关闭
</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>string</type><type>false</type></type><methodname>ob_get_flush</methodname>
<void/>
</methodsynopsis>
<para>
<function>ob_get_flush</function> 刷新输出缓冲区,将其作为字符串返回并关闭输出缓冲。
该函数调用输出处理程序(使用 <constant>PHP_OUTPUT_HANDLER_FINAL</constant>
flag),冲刷(发送)其返回值,返回活动输出缓冲区的内容并关闭活动输出缓冲区。
</para>
<para>
如果没有以 <constant>PHP_OUTPUT_HANDLER_REMOVABLE</constant> flag 启动的活动输出缓冲区,<function>ob_get_flush</function> 将失败。
</para>
<para>
输出缓冲区比由带有 <link linkend="constant.php-output-handler-flushable">PHP_OUTPUT_HANDLER_FLUSHABLE</link>
flag 的 <function>ob_start</function> 启动。否则 <function>ob_get_flush</function> 将不起作用
<function>ob_get_flush</function> 将冲刷(发送)输出处理程序的返回值,即使活动输出缓冲区是在没有
<constant>PHP_OUTPUT_HANDLER_FLUSHABLE</constant> flag 的情况下启动的
</para>
<note>
<simpara>
此函数与 <function>ob_end_flush</function> 相似,不同的是此函数会把缓冲区作为字符串返回。
</simpara>
</note>
</refsect1>

<refsect1 role="parameters">
Expand All @@ -35,7 +36,14 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
返回输出缓冲区的内容或者没有缓冲区激活时返回 &false;
成功时返回活动输出缓冲区的内容,失败时返回 &false;
</para>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<para>
如果函数失败生成 <constant>E_NOTICE</constant>。
</para>
</refsect1>

Expand Down Expand Up @@ -78,15 +86,16 @@ Array
&reftitle.seealso;
<para>
<simplelist>
<member><function>ob_end_clean</function></member>
<member><function>ob_start</function></member>
<member><function>ob_get_contents</function></member>
<member><function>ob_flush</function></member>
<member><function>ob_end_flush</function></member>
<member><function>ob_list_handlers</function></member>
<member><function>ob_get_clean</function></member>
</simplelist>
</para>
</refsect1>
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
Loading

0 comments on commit 22c9982

Please sign in to comment.