-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathinclude-once.xml
More file actions
42 lines (41 loc) · 1.47 KB
/
include-once.xml
File metadata and controls
42 lines (41 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 89d80c92a1154a2903fff371f0d056bf2ac8ba27 Maintainer: dallas Status: ready -->
<!-- CREDITS: Luffy -->
<sect1 xml:id="function.include-once" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>include_once</title>
<?phpdoc print-version-for="include_once"?>
<para>
<literal>include_once</literal> 表达在脚本执行期间包含并运行指定文件。此行为和
<function>include</function> 表达类似,
唯一区别是如果该文件中已经被包含过,则不会再次包含,且 include_once 会返回 &true;。
顾名思义,require_once,文件仅仅包含(require)一次。
</para>
<para>
<literal>include_once</literal>
可以用于在脚本执行期间同一个文件有可能被包含超过一次的情况下,想确保它只被包含一次以避免函数重定义,变量重新赋值等问题。
</para>
<para>
更多信息参见 <function>include</function> 文档。
</para>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->