Description
array
get_included_files ( void )
Returns an array of the names of all files that have been
included using include(),
include_once(), require()
or require_once()_
Files that are included or required multiple times only show up
once in the returned array_
Nota:
Files included using the auto_prepend_file
configuration directive are not included in the returned array_
Ejemplo 1_ get_included_files() example <?php
include("test1_php");
include_once("test2_php");
require("test3_php");
require_once("test4_php");
$included_files = get_included_files();
foreach($included_files as $filename) {
echo "$filename\n";
}
?> |
will generate the following output:
test1_php
test2_php
test3_php
test4_php |
|
Nota:
In PHP 4_0_1pl2 and previous versions
get_included_files() assumed that the
required files ended in the extension _php;
other extensions would not be returned_ The array returned by
get_included_files() was an associative array
and only listed files included by include()
and include_once()_
See also
include(),
include_once(),
require(),
require_once(), and
get_required_files()_