get_required_files

array get_required_files(void) 

Gets the list of files used by require().

Returns:

Array of required files

Description:

Returns an array containing the names of files that have been included in the current script, using either the require() or require_once() function.

Version:

Existing since version 4.0

See also:

get_included_files() 

Example:

Display required files
require("testinclude.php"); 
print_r(get_required_files()); 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.