com doc/zh: Sync with EN.: language/control-structures/include-once.xml
| From: | Dai Jie | Date: | Sun, 17 Jan 2021 16:53:46 +0000 |
| Subject: | com doc/zh: Sync with EN.: language/control-structures/include-once.xml | ||
| Groups: | php.doc.zh | ||
| Request: | Send a blank email to doc-zh+get-5925@lists.php.net to get a copy of this message | ||
Commit: fe7e4ac02d231f546fba7ad32fbc2b0ddf9f05c8
Author: 戴劼 <daijie@php.net> Mon, 18 Jan 2021 00:53:46 +0800
Parents: a768a9d478f9d5a7a8e4d3329efdab6bba232693
Branches: master
Link: http://git.php.net/?p=doc/zh.git;a=commitdiff;h=fe7e4ac02d231f546fba7ad32fbc2b0ddf9f05c8
Log:
Sync with EN.
Changed paths:
M language/control-structures/include-once.xml
Diff:
diff --git a/language/control-structures/include-once.xml
b/language/control-structures/include-once.xml
index 09b03b9f..340e89c0 100644
--- a/language/control-structures/include-once.xml
+++ b/language/control-structures/include-once.xml
@@ -2,7 +2,7 @@
<!-- $Revision$ -->
<!-- $Author$ -->
<!-- Reviewed: yes Maintainer: dallas -->
-<!-- EN-Revision: 84b8fca68fc762fefe85acde180a38b2e77a28b9 Maintainer: dallas Status: ready
-->
+<!-- EN-Revision: af6fdf16ab44bcf4d045407963e43c3d9dd2ff29 Maintainer: dallas Status: ready
-->
<sect1 xml:id="function.include-once" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title><function>include_once</function></title>
@@ -10,7 +10,8 @@
<para>
<literal>include_once</literal>
语句在脚本执行期间包含并运行指定文件。此行为和
<function>include</function>
-
语句类似,唯一区别是如果该文件中已经被包含过,则不会再次包含。如同此语句名字暗示的那样,只会包含一次。
+ 语句类似,唯一区别是如果该文件中已经被包含过,则不会再次包含,且
include_once 会返回 &true;。
+ 如同此语句名字暗示的那样,该文件只会包含一次。
</para>
<para>
<literal>include_once</literal>
@@ -19,30 +20,6 @@
<para>
更多信息参见 <function>include</function> 文档。
</para>
- <para>
- <note>
- <para>
- 在 PHP 4中,<literal>_once</literal>
的行为在不区分大小写字母的操作系统(例如
- Windows)中有所不同,例如:
- <example>
- <title><function>include_once</function> 在 PHP 4
运行于不区分大小写的操作系统中</title>
- <programlisting role="php">
-<![CDATA[
-<?php
-include_once "a..php"; // 这将包含 a.php
-include_once "A.php"; // 这将再次包含 a.php!(仅 PHP 4)
-?>
-]]>
- </programlisting>
- </example>
- </para>
- <para>
- 此行为在 PHP 5 中改了,例如在 Windows 中路径先被规格化,因此
- <filename>C:\PROGRA~1\A.php</filename> 和
- <filename>C:\Program Files\a.php</filename>
的实现一样,文件只会被包含一次。
- </para>
- </note>
- </para>
</sect1>
<!-- Keep this comment at the end of the file