get_required_files
(alias of get_included_files()) does not accept any parameters. It will return an array with all the included files (include
, include_once
, require
and require_once
).
A working example (from the reference of get_included_files()):
<?php
include 'test1.php';
include_once 'test2.php';
require 'test3.php';
require_once 'test4.php';
// Get all included files
$included_files = get_included_files();
// Loop the files and show the filenames
foreach ($included_files as $filename) {
echo "$filename\n";
}
?>
If you want to include a file, just use "include":
<?php
include 'config.php';
include 'funksjoner.php';
?>