get_included_files()
get_included_files()
get_included_files ()
- It returns an array with the names of included or required files.
It 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.
Syntax:
=====
array get_included_files ()
Example:
======
<?php
include(”test1.php”);
include_once(”test2.php”);
require(”test3.php”);
require_once(”test4.php”);
$included_files = get_included_files();
print_r($included_files);
?>
It will generate the following output:
Array
(
[0] => E:\work\test1.php
[1] => E:\work\test2.php
[2] => E:\work\test3.php
[3] => E:\work\test4.php
)
