mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Added note and example about the fact that get_included_files() shows the
first called script. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@148728 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
a0eb6a600e
commit
73090c8695
1 changed files with 12 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/info.xml, last change in rev 1.71 -->
|
||||
<refentry id="function.get-included-files">
|
||||
<refnamediv>
|
||||
|
@ -20,6 +20,11 @@
|
|||
<function>include_once</function>, <function>require</function>
|
||||
or <function>require_once</function>.
|
||||
</para>
|
||||
<para>
|
||||
The script originally called is considered an "included file," so
|
||||
it will be listed together with the files referenced by
|
||||
<function>include</function> and family.
|
||||
</para>
|
||||
<para>
|
||||
Files that are included or required multiple times only show up
|
||||
once in the returned array.
|
||||
|
@ -32,15 +37,15 @@
|
|||
</note>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>get_included_files</function> example</title>
|
||||
<title><function>get_included_files</function> example (<filename>abc.php</filename>)</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
include("test1.php");
|
||||
include_once("test2.php");
|
||||
require("test3.php");
|
||||
require_once("test4.php");
|
||||
include 'test1.php';
|
||||
include_once 'test2.php';
|
||||
require 'test3.php';
|
||||
require_once 'test4.php';
|
||||
|
||||
$included_files = get_included_files();
|
||||
|
||||
|
@ -56,6 +61,7 @@ foreach ($included_files as $filename) {
|
|||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
abc.php
|
||||
test1.php
|
||||
test2.php
|
||||
test3.php
|
||||
|
|
Loading…
Reference in a new issue