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

Update appendices/features

This commit is contained in:
mowangjuanzi
2025-01-01 02:08:33 +08:00
parent b6b16bbc95
commit 8ee1e1758c
4 changed files with 58 additions and 73 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 565582ac3739b56c81ee0206aac9c994ca9fdb5e Maintainer: Avenger Status: ready -->
<!-- EN-Revision: 90787fda14dcb0976a9738423e6c6013c037d048 Maintainer: Avenger Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<section xml:id="ini.core" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>&php.ini; 核心指令说明</title>
@@ -1313,37 +1313,37 @@ include_path = ".:${USER}/pear/php"
</note>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.cgi.rfc2616-headers">
<term>
<parameter>cgi.rfc2616_headers</parameter>
<type>int</type>
<type>bool</type>
</term>
<listitem>
<para>
告诉 PHP 在发送 HTTP 响应代码时使用什么样的标头类型。如果设置为 0PHP 将发送 Apache 和其他 Web 服务器支持的
<link xlink:href="&url.rfc;3875">RFC 3875</link> "Status:" 标头。当此选项设置为 1 PHP 将发送
<link xlink:href="&url.rfc;2616">RFC 2616</link> 兼容标头
告诉 PHP 在发送 HTTP 响应 code 时使用什么样的 header 类型。如果禁用PHP 将发送 Apache 和其他 Web 服务器支持的
<link xlink:href="&url.rfc;3875">RFC 3875</link> "Status:" header。当启用PHP 将发送
<link xlink:href="&url.rfc;2616">RFC 2616</link> 兼容 header
</para>
<para>
如果启用此选项,并且在 CGI 环境(例如 PHP-FPM中运行 PHP则不应使用标准的 RFC 2616 样式的 HTTP 状态响应标头,而应使用其等效的
RFC 3875例如不该使用 header("HTTP/1.0 404 Not found"); 应该使用 header("Status: 404 Not Found");
</para>
<para>
除非知道自己在做什么,否则请将其设置为 0
除非知道自己在做什么,否则请将其禁用
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.fastcgi.impersonate">
<term>
<parameter>fastcgi.impersonate</parameter>
<type>string</type>
<type>bool</type>
</term>
<listitem>
<para>
IIS 下的 FastCGI在基于 WINNT 的操作系统上)支持模拟调用客户端的安全令牌的能力。这允许 IIS 定义请求在其下运行的安全上下文。Apache
下的 mod_fastcgi 目前不支持此功能2002-03-17。如果在 IIS 下运行,则设置为 1。默认为 0
下的 mod_fastcgi 目前不支持此功能2002-03-17。如果在 IIS 下运行,则启用。默认禁用
</para>
</listitem>
</varlistentry>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 4b4292baf79bb650763e8230dbb254ee59d5ce80 Maintainer: HonestQiao Status: ready -->
<!-- EN-Revision: 74ba8fee2972b6ba4f955392d760dea54e757a95 Maintainer: HonestQiao Status: ready -->
<!-- CREDITS: HonestQiao, Haohappy, Luffy, mowangjuanzi -->
<chapter xml:id="features.commandline" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>PHP 的命令行模式</title>
@@ -168,7 +168,25 @@
<varname>$_SERVER</varname> 数组
来访问它们,例如:<varname>$_SERVER['argv']</varname>
</para>
</entry>
<warning>
<para>
<varname>$argv</varname><varname>$_SERVER['argv']</varname>
的存在并不能表明脚本一定正在从命令行运行,因为当启用 <link linkend="ini.register-argc-argv">register_argc_argv</link>
时,它们可能在其他上下文中设置。应改为检查 <function>php_sapi_name</function> 返回的值。
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
if (php_sapi_name() === 'cli') {
echo "This is being run from the command line!\n";
}
]]>
</programlisting>
</informalexample>
</para>
</warning>
</entry>
</row>
<row>
<entry><link linkend="ini.output-buffering">output_buffering</link></entry>

View File

@@ -201,53 +201,38 @@ var_dump($post->id);
<title>初始化触发器</title>
<simpara>
Lazy objects are designed to be fully transparent to their consumers,
so normal operations that observe or modify the object's state will
automatically trigger initialization before the operation is performed. This
includes, but is not limited to, the following operations:
延迟对象设计为对其使用者完全透明,因此观察或修改对象状态的常规操作将在执行操作之前自动触发初始化。这包括但不限于以下操作:
</simpara>
<simplelist>
<member>
Reading or writing a property.
读取或写入属性。
</member>
<member>
Testing if a property is set or unsetting it.
测试属性是否已设置或已清除。
</member>
<member>
Accessing or modifying a property via
<methodname>ReflectionProperty::getValue</methodname>,
<methodname>ReflectionProperty::getRawValue</methodname>,
<methodname>ReflectionProperty::setValue</methodname>,
or <methodname>ReflectionProperty::setRawValue</methodname>.
通过 <methodname>ReflectionProperty::getValue</methodname><methodname>ReflectionProperty::getRawValue</methodname><methodname>ReflectionProperty::setValue</methodname>,
<methodname>ReflectionProperty::setRawValue</methodname> 访问或修改属性。
</member>
<member>
Listing properties with
<methodname>ReflectionObject::getProperties</methodname>,
<methodname>ReflectionObject::getProperty</methodname>,
<function>get_object_vars</function>.
使用 <methodname>ReflectionObject::getProperties</methodname><methodname>ReflectionObject::getProperty</methodname><function>get_object_vars</function>
列出属性。
</member>
<member>
Iterating over properties of an object that does not implement
<interfacename>Iterator</interfacename> or
<interfacename>IteratorAggregate</interfacename> using
<link linkend="control-structures.foreach">foreach</link>.
使用 <link linkend="control-structures.foreach">foreach</link> 迭代未实现 <interfacename>Iterator</interfacename>
<interfacename>IteratorAggregate</interfacename> 的对象属性。
</member>
<member>
Serializing the object with <function>serialize</function>,
<function>json_encode</function>, etc.
使用 <function>serialize</function><function>json_encode</function> 等序列化对象。
</member>
<member>
<link linkend="language.oop5.lazy-objects.cloning">Cloning</link> the
object.
<link linkend="language.oop5.lazy-objects.cloning">克隆</link>对象。
</member>
</simplelist>
<simpara>
Method calls that do not access the object state will not trigger
initialization. Similarly, interactions with the object that invoke magic
methods or hook functions will not trigger initialization if these methods
or functions do not access the object's state.
方法调用不访问对象状态的话不会触发初始化。同样,如果这些方法或函数不访问对象的状态,则调用魔术方法或挂钩函数与对象的交互也不会触发初始化。
</simpara>
<sect3>

View File

@@ -3357,8 +3357,7 @@
</term>
<listitem>
<para>
A <type>string</type> with the SSL client certificate.
Available as of PHP 8.1.0 and cURL 7.71.0.
包含 SSL 客户端证书的 <type>string</type>。自 PHP 8.1.0 和 cURL 7.71.0 起可用。
</para>
</listitem>
</varlistentry>
@@ -3369,9 +3368,8 @@
</term>
<listitem>
<para>
The <type>string</type> identifier for the crypto engine of the private SSL key
specified in <constant>CURLOPT_SSLKEY</constant>.
Available as of cURL 7.9.3.
<constant>CURLOPT_SSLKEY</constant> 中指定私有 SSL 密钥的加密引擎的 <type>string</type>
标识符。自 cURL 7.9.3 起可用。
</para>
</listitem>
</varlistentry>
@@ -3382,9 +3380,7 @@
</term>
<listitem>
<para>
The <type>string</type> identifier for the crypto engine used for asymmetric crypto
operations.
Available as of cURL 7.9.3.
加密引擎的 <type>string</type> 标识符,用于非对称加密操作。自 cURL 7.9.3 起可用。
</para>
</listitem>
</varlistentry>
@@ -3395,8 +3391,7 @@
</term>
<listitem>
<para>
The name of a file containing a private SSL key.
Available as of cURL 7.9.3.
包含私有 SSL 密钥的文件名。自 cURL 7.9.3 起可用。
</para>
</listitem>
</varlistentry>
@@ -3407,15 +3402,13 @@
</term>
<listitem>
<para>
The secret password needed to use the private SSL key specified in
<constant>CURLOPT_SSLKEY</constant>.
使用 <constant>CURLOPT_SSLKEY</constant> 中指定私有 SSL 密钥所需的秘密密码。
<note>
<para>
Since this option contains a sensitive password, remember to keep
the PHP script it is contained within safe.
由于此选项包含敏感密码,请确保妥善保管包含该选项的 PHP 脚本。
</para>
</note>
Available as of cURL 7.9.3 and deprecated as of cURL 7.17.0.
自 cURL 7.9.3 起可用并且自 cURL 7.17.0 起弃用。
</para>
</listitem>
</varlistentry>
@@ -3426,15 +3419,12 @@
</term>
<listitem>
<para>
The key type of the private SSL key specified in
<constant>CURLOPT_SSLKEY</constant>. Supported key types are:
<constant>CURLOPT_SSLKEY</constant> 中指定私有 SSL 密钥的秘钥类型。支持的密钥类型有:
<simplelist type="inline">
<member><literal>PEM</literal></member>
<member><literal>DER</literal></member>
<member><literal>ENG</literal></member>
</simplelist>.
Defaults to <literal>PEM</literal>.
Available as of cURL 7.9.3.
</simplelist>。默认为 <literal>PEM</literal>。自 cURL 7.9.3 起可用。
</para>
</listitem>
</varlistentry>
@@ -3445,8 +3435,7 @@
</term>
<listitem>
<para>
A <type>string</type> private key for client cert.
Available as of PHP 8.1.0 and cURL 7.71.0.
客户端证书的 <type>string</type> 私钥。自 PHP 8.1.0 和 cURL 7.71.0 起可用。
</para>
</listitem>
</varlistentry>
@@ -3457,16 +3446,14 @@
</term>
<listitem>
<para>
One of
the <constant>CURL_SSLVERSION_<replaceable>*</replaceable></constant> constants.
<constant>CURL_SSLVERSION_<replaceable>*</replaceable></constant> 常量之一。
<warning>
<simpara>
最好不要设置此选项并使用默认值。因为考虑到 SSLv2 和 SSLv3 中已知的漏洞,将其设置为
<constant>CURL_SSLVERSION_SSLv2</constant><constant>CURL_SSLVERSION_SSLv3</constant> 非常危险。
</simpara>
</warning>
Defaults to <constant>CURL_SSLVERSION_DEFAULT</constant>.
Available as of cURL 7.1.0.
默认为 <constant>CURL_SSLVERSION_DEFAULT</constant>。自 cURL 7.1.0 起可用。
</para>
</listitem>
</varlistentry>
@@ -3477,9 +3464,7 @@
</term>
<listitem>
<para>
A colon-separated <type>string</type> of ciphers to use
for the TLS 1.2 (1.1, 1.0) connection.
Available as of cURL 7.9.
用于 TLS 1.21.1、1.0)连接的以冒号分隔的密码 <type>string</type>。自 cURL 7.9 起可用。
</para>
</listitem>
</varlistentry>
@@ -3490,11 +3475,8 @@
</term>
<listitem>
<para>
A colon delimited list of elliptic curve algorithms. For example,
<literal>X25519:P-521</literal> is a valid list of two elliptic curves.
This option defines the client's key exchange algorithms in the SSL handshake,
if the SSL backend cURL is built to use supports it.
Available as of PHP 8.2.0 and cURL 7.73.0.
椭圆曲线算法的冒号分隔列表。例如,<literal>X25519:P-521</literal> 是两个椭圆曲线的有效列表。此选项定义
SSL 握手中的客户端密钥交换算法(如果 SSL 后端 cURL 编译为支持该算法)。自 PHP 8.2.0 和 cURL 7.73.0 起可用。
</para>
</listitem>
</varlistentry>