mirror of
https://github.com/php/doc-zh.git
synced 2026-03-24 07:02:15 +01:00
43 lines
1.5 KiB
XML
43 lines
1.5 KiB
XML
<?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
|
||
-->
|