Answer the question
In order to leave comments, you need to log in
Is it possible to get a list of all include files in PHP?
That is, the index.php script is executed, calls other scripts, those third ones, etc. As a result, I want to get a complete list of called files, ideally with line numbers of the call.
Answer the question
In order to leave comments, you need to log in
If you get too confused, you can do it like this:
1. Connect runkit .
2. Redefine the include functions: include(), include_once(), require(), require_once() with our own, which will be wrappers for the original ones.
3. In the wrapper, through debug_backtrace(), we find out who called the function, and collect the calls in the log.
xdebug :
xdebug_start_code_coverage()… xdebug_get_code_coverage()
- returns all included files and executed line numbers.
If you are profiling, then I recommend this article: css.dzone.com/news/profiling-php-application
Xhgui over xhprof is especially good.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question