Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有一种简单的方法可以找到一行代码出现的确切 php 页面(包括路径)?例如,如果我正在编辑一个 wordpress 主题,其中包含多个嵌套文件夹中的数百个 php 文件,那么找到编译源代码中的第 349 行出现在文件结构中的什么位置?
PHP 语言是解释型的而不是编译型的
通常它会在发生错误时告诉你文件的完整路径。
如果没有,您可以使用以下方法显示它:
$path = dirname(__FILE__); echo $path ;