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.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.