PHP - How to get the paths of all currently called files when in specified web page view

Viewed 27

I am working with a template package (created by someone else) that has over 200 php files in multiple folders, and string scanning does not always return all the files in use. (I really hate using that method)

Method desired

When viewing page mysite.com/cartthere are multiple php processes being handled by several files in different locations. I need to get all those paths in an output method that can be printed in the template's global included file, _head.php

Example

print_r( get_current_called_file_paths() );
/*
Array 
(
[0] => /home/mysite/public_html/tmpl/bigshop/cart.php
[1] => /home/mysite/public_html/tmpl/bigshop/includes/userdata.php
[2] => /home/mysite/public_html/tmpl/bigshop/db/user_history.php
[3] => /home/mysite/public_html/tmpl/bigshop/_head.php
[4] => /home/mysite/public_html/tmpl/bigshop/classes/class.cart_handler.php
)
*/

Is there a method in PHP to do this? If not, is there a process known at any resource (github etc) that will do the task?

0 Answers
Related