Theres a PHP function called get_included_files()
which returns a list of all files that were loaded via include
, include_once
, require
and require_once
.
It may be a bit primitive for what you are looking for (it doesn't have the caller line numbers etc), but it will at least show you all the files used during a particular execution. Just add a call to that function near the end of the main script.
Since it returns an array you'll probably need to dump the contents (i.e. print_r(get_included_files())
.
See the get_included_files()
manual page on php.net for more usage details.