Get_required_files
(PHP4 >= 4.0rc2)
Get_required_files---&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; Returns the name of the require_once () file in the program
Syntax: array get_required_files (void)
Description:
This function returns the name of all files that are loaded into the program using require_once (), which returns a combined array whose index value is the name of the file that is used in require_once () without the ". PHP".
Example:
<?php
Require_once ("local.php");
Require_once (". /inc/global.php ");
For ($i =1 $i <5; $i + +)
Include "Util". $i. " PHP ";
echo "Required_once files\n";
Print_r (Get_required_files ());
echo "Included_once files\n";
Print_r (Get_included_files ());
?>
This produces the following output:
required_once files
Array
(
[Local] => local.php
[.. /inc/global] =>/full/path/to/inc/global.php
)
included_once files
Array
(
[Util1] => util1.php
[Util2] => util2.php
[Util3] => util3.php
[Util4] => util4.php
)
Note: In PHP 4.0.1pl2, this function assumes that the Required_once file is the result of an expanded ". php", and that other extensions will not work.
Reference: require_once () include_once () Get_included_files ()