开发者

Is there any way of inspecting an element and seeing from which PHP file is comming from?

开发者 https://www.devze.com 2023-03-05 12:12 出处:网络
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)

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消