get_included_files()

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
)

Leave a Reply


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.