For instance, when I'm trying to understand how a Wordpress t开发者_如何学编程heme was coded, I spend hours trying to figure out which php file is generating the element (for instance, a div or link).
Is there any way of detecting the PHP file?
You can use debug_backtrace() or debug_print_backtrace() to dig really deep and find out all kinds of information, such as when and where functions are called and files are loaded.
This is really useful for finding out how a Wordpress theme was coded
. It will tell you pretty much everything.
well if you have xdebug and kcachegrind you can use kcachegrind to view the cachegrind output file of xdebug. there is also a php version called webgrind that you can run on your local system if you are developing on your own computer before transfering the files to you server.
精彩评论