1
0
mirror of https://github.com/php/doc-zh.git synced 2026-03-23 22:52:08 +01:00

Update install/classobj/info

This commit is contained in:
mowangjuanzi
2024-01-29 23:56:20 +08:00
parent c155e25c78
commit 65c3c0b20e
7 changed files with 46 additions and 86 deletions

View File

@@ -42,9 +42,7 @@ Warning: A non-numeric value encountered in %s on line %d
<title>八进制转义序列溢出时发出警告</title>
<para>
Previously, 3-octet octal string escape sequences would overflow silently.
Now, they will still overflow, but <constant>E_WARNING</constant> will be
emitted.
以前3 字节的八进制字符串转义序列会默默溢出。现在,仍然会溢出,但会发出 <constant>E_WARNING</constant> 警告。
</para>
<informalexample>
@@ -68,11 +66,8 @@ string(1) "@"
<title><literal>$this</literal> 不一致的修正</title>
<para>
Whilst <literal>$this</literal> is considered a special variable in PHP, it
lacked proper checks to ensure it wasn't used as a variable name or
reassigned. This has now been rectified to ensure that
<literal>$this</literal> cannot be a user-defined variable, reassigned to a
different value, or be globalised.
虽然在 PHP 中将 <literal>$this</literal> 视为特殊变量,但它缺乏适当的检查来确保不会用作变量名或重新分配。现在已对此进行纠正,以确保
<literal>$this</literal> 不能是用户定义的变量、重新分配给不同的值或全局化。
</para>
</sect2>

View File

@@ -6,7 +6,7 @@
Entities for the categorized extension list, so it does not need
to be translated, and thus it is not going to be outdated.
-->
<!ENTITY extcat.intro '<title xmlns="http://docbook.org/ns/docbook">扩展库列表归类</title>
<!ENTITY extcat.intro '<title xmlns="http://docbook.org/ns/docbook">扩展库列表/归类</title>
<para xmlns="http://docbook.org/ns/docbook">本附录将 PHP 手册中的 150
多个扩展库以不同标准分类。</para>'>

View File

@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 4eeb07225f615fcde68cbefb84df2fc9bf278f1f Maintainer: dallas Status: ready -->
<!-- Reviewed: yes -->
<chapter xml:id="configuration" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- EN-Revision: 15841d188475e59c105f57c9022873f2cd7467b5 Maintainer: dallas Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<chapter xml:id="configuration" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>运行时配置</title>
<sect1 xml:id="configuration.file">
<title>配置文件</title>
<simpara>
配置文件(&php.ini;)在 PHP 启动时被读取。对于服务器模块版本的 PHP仅在 web
服务器启动时读取一次。对于
@@ -192,17 +192,15 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php
</informalexample>
</sect2>
</sect1>
<sect1 xml:id="configuration.file.per-user">
<title>.user.ini 文件</title>
<simpara>
PHP 支持基于每个目录的 INI 文件配置。此类文件
<emphasis></emphasis>被 CGIFastCGI SAPI 处理。此功能使得 PECL 的 htscanner
扩展作废。如果你的 PHP 以模块化运行在 Apache 里,则用 &htaccess; 文件有同样效果。
</simpara>
<simpara>
除了主 &php.ini; 之外PHP 还会在每个目录下扫描 INI
@@ -215,8 +213,6 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php
<constant>INI_USER</constant> 模式的 INI
设置可被识别。
</simpara>
<simpara>
两个新的 INI 指令,
@@ -224,29 +220,29 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php
<link linkend="ini.user-ini.cache-ttl">user_ini.cache_ttl</link>
控制着用户 INI 文件的使用。
</simpara>
<simpara>
<link linkend="ini.user-ini.filename">user_ini.filename</link> 设定了 PHP
会在每个目录下搜寻的文件名;如果设定为空字符串则 PHP
不会搜寻。默认值是 <literal>.user.ini</literal>
</simpara>
<simpara>
<link linkend="ini.user-ini.cache-ttl">user_ini.cache_ttl</link> 控制着重新读取用户
INI 文件的间隔时间。默认是 300 秒5 分钟)。
</simpara>
</sect1>
<sect1 xml:id="configuration.changes.modes">
<title>配置可被设定范围</title>
<para>
这些模式决定着一个 PHP
的指令在何时何地,是否能够被设定。手册中的每个指令都有其所属的模式。例如有些指令可以在
PHP 脚本中用 <function>ini_set</function> 来设定,而有些则只能在
&php.ini;&httpd.conf; 中。
</para>
<para>
例如
<link linkend="ini.output-buffering">output_buffering</link>
@@ -258,48 +254,17 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php
<constant>INI_ALL</constant> 因而就可以在任何地方被设定,包括
<function>ini_set</function>
</para>
<para>
<table>
<title>INI_* 模式的定义</title>
<tgroup cols="3">
<thead>
<row>
<entry>模式</entry>
<entry>含义</entry>
</row>
</thead>
<tbody>
<row>
<entry><constant>INI_USER</constant></entry>
<entry>
可在用户脚本(例如 <function>ini_set</function>)或
<link linkend="configuration.changes.windows">Windows 注册表</link>以及 &user-ini; 中设定
</entry>
</row>
<row>
<entry><constant>INI_PERDIR</constant></entry>
<entry>可在 &php.ini;&htaccess;&httpd.conf; 中设定</entry>
</row>
<row>
<entry><constant>INI_SYSTEM</constant></entry>
<entry>可在 &php.ini;&httpd.conf; 中设定</entry>
</row>
<row>
<entry><constant>INI_ALL</constant></entry>
<entry>可在任何地方设定</entry>
</row>
</tbody>
</tgroup>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('constant.ini-mode')/*)"><xi:fallback/></xi:include>
</table>
</para>
</sect1>
<sect1 xml:id="configuration.changes">
<title>怎样修改配置设定</title>
<sect2 xml:id="configuration.changes.apache">
<title>PHP 运行于 Apache 模块方式</title>
<simpara>
@@ -308,15 +273,15 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php
文件中的指令来修改 PHP 的配置设定。需要有“AllowOverride
Options”或“AllowOverride All”权限才可以。
</simpara>
<para>
有几个 Apache 指令可以使用户在 Apache
配置文件内部修改 PHP 的配置。哪些指令属于
<constant>INI_ALL</constant><constant>INI_PERDIR</constant>
<constant>INI_ALL</constant><constant>INI_PERDIR</constant>
<constant>INI_SYSTEM</constant> 中的哪一个,请参考附录中的
<link linkend="ini.list">php.ini 配置选项列表</link>
</para>
<para>
<variablelist>
<varlistentry>
@@ -414,8 +379,6 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php
</para>
</caution>
</sect2>
<sect2 xml:id="configuration.changes.windows">
<title>通过 Windows 注册表修改 PHP 配置</title>
@@ -433,11 +396,6 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php
的值就不行。因为这些配置对于每次请求来说是只读的。
</simpara>
</sect2>
<sect2 xml:id="configuration.changes.other">
<title>其它接口下的 PHP</title>
@@ -454,8 +412,6 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php
</para>
</sect2>
</sect1>
</chapter>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 56509d07ae636f076057f55bbb2572ab7b7a39eb Maintainer: Gregory Status: ready -->
<!-- EN-Revision: 21e1338e9721534c00085ff3cff25e2dd2e84dc9 Maintainer: Gregory Status: ready -->
<!-- CREDITS: dallas, mowangjuanzi, Luffy -->
<!-- 请保持此文件与英文文件中相应的每个 ENTITY 行号一一对应以便于对照,修改与更新! -->
@@ -1615,6 +1615,17 @@ It is strongly recommended to avoid timezone abbreviations.
of the <link linkend="libxml.constants">libxml option constants</link>.
</para>'>
<!ENTITY dom.parameters.register_node_ns '<varlistentry xmlns="http://docbook.org/ns/docbook">
<term><parameter>registerNodeNS</parameter></term>
<listitem>
<para>
Whether to automatically register the in-scope namespace prefixes of the context node to the <classname>DOMXPath</classname> object.
This can be used to avoid needing to call <methodname>DOMXPath::registerNamespace</methodname> manually for each in-scope namespaces.
When a namespace prefix conflict exists, only the nearest descendant namespace prefix is registered.
</para>
</listitem>
</varlistentry>'>
<!ENTITY dom.errors.hierarchy.parent '<varlistentry xmlns="http://docbook.org/ns/docbook">
<term><constant>DOM_HIERARCHY_REQUEST_ERR</constant></term>
<listitem>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 6846ebb4e33d51faee4a1e99c241a7a24861e0e4 Maintainer: HonestQiao Status: ready -->
<!-- EN-Revision: a4fb7f59310a598b8cb8ca1daa47e557f32ae66e Maintainer: HonestQiao Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<refentry xml:id="function.property-exists" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
@@ -51,7 +51,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
如果属性存在则返回 &true;,不存在则返回 &false;如果发生错误则返回 &null;
如果属性存在则返回 &true;,不存在则返回 &false;
</para>
</refsect1>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 05c845a6de8dd7e23a9ed12ca2f9f9744f05ff70 Maintainer: daijie Status: ready -->
<!-- EN-Revision: 87663748fbb51015be41d55bbd7f7d000e5aae3b Maintainer: daijie Status: ready -->
<!-- CREDITS: Luffy, mowangjuanzi -->
<appendix xml:id="info.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.constants;
@@ -149,7 +149,7 @@
</tgroup>
</table>
<table>
<table xml:id="constant.ini-mode">
<title>INI 模式常量</title>
<tgroup cols="2">
<thead>
@@ -159,7 +159,7 @@
</row>
</thead>
<tbody>
<row xml:id="constant.ini-user">
<row>
<entry>
<constant>INI_USER</constant>
(<type>int</type>)
@@ -169,7 +169,7 @@
注册表</link>中设置条目。可以在 &user-ini; 中设置条目
</entry>
</row>
<row xml:id="constant.ini-perdir">
<row>
<entry>
<constant>INI_PERDIR</constant>
(<type>int</type>)
@@ -178,7 +178,7 @@
可以在 &php.ini;&htaccess;&httpd.conf;&user-ini; 中设置条目
</entry>
</row>
<row xml:id="constant.ini-system">
<row>
<entry>
<constant>INI_SYSTEM</constant>
(<type>int</type>)
@@ -187,7 +187,7 @@
可以在 &php.ini;&httpd.conf; 中设置条目
</entry>
</row>
<row xml:id="constant.ini-all">
<row>
<entry>
<constant>INI_ALL</constant>
(<type>int</type>)

View File

@@ -211,8 +211,7 @@ mail('caffeinated@example.com', 'My Subject', $message);
<example>
<title>使用额外标头发送邮件</title>
<para>
The addition of basic headers, telling the MUA
the From and Reply-To addresses:
添加基本 header告诉 MUA 发件人和回复地址:
</para>
<programlisting role="php">
<![CDATA[
@@ -232,8 +231,7 @@ mail($to, $subject, $message, $headers);
<example>
<title>使用 <type>array</type> 形式的额外标头发送邮件</title>
<para>
This example sends the same mail as the example immediately above, but
passes the additional headers as array (available as of PHP 7.2.0).
此示例与上面示例发送邮件相同,但将附加 header 作为数组传递(自 PHP 7.2.0 起可用)。
</para>
<programlisting role="php">
<![CDATA[
@@ -253,7 +251,7 @@ mail($to, $subject, $message, $headers);
</programlisting>
</example>
<example>
<title>Sending mail with an additional command line parameter.</title>
<title>使用附加命令行参数发送邮件。</title>
<para>
The <parameter>additional_params</parameter> parameter
can be used to pass an additional parameter to the program configured