找到哪些php文件在WordPress中生成了HTML代码行的最佳方式 [英] Best way to find out which php file has generated an html line of code in WordPress

查看:93
本文介绍了找到哪些php文件在WordPress中生成了HTML代码行的最佳方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Chrome,您可以右键单击 - 检查元素以查看该元素后面的HTML代码:

Using Chrome you can right click - Inspect element to see the html code behind that element:

我想知道如何找到哪个php文件已经生成了该html。也许有一些工具将断点放入html中,所以当尝试再次生成PHP时,php服务器将停止?

I wonder how to find which php file has generated that html. Maybe there is some tool to put a breakpoint into the html so the php server will stop when trying to generate it again?

我在本地使用WordPress。我在Ubuntu 14.04LMS。我正在使用带有XDebug的Sublime Text 3。

I'm using WordPress locally. I'm on Ubuntu 14.04LMS. I'm using Sublime Text 3 with XDebug.

更新1

一个WordPress插件能够在每个文件中放置以下内容,这将是一个很好的解决方案(我从初学者的角度来看):

A WordPress plugin able to put, in every file, something like the following would be a good solution (I think from my beginner's viewpoint):

echo '<!-- name_of_the_php_file.php -->';


推荐答案

使用此插件什么文件找出php文件。然后休息是在任何编辑器中通过CTRL + F找出函数或其他东西。

Use this plugin "what the file" to find out the php file. Then rest it is to find out function or something else by CTRL + F in any editor.

这篇关于找到哪些php文件在WordPress中生成了HTML代码行的最佳方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆