简体   繁体   English

查找结构复杂的php页面

[英]finding php page in complicated structure

Is there an easy way to find the exact php page (including path) that a line of code appears in? 有没有一种简单的方法来找到代码行所在的确切php页面(包括路径)? For example, if I'm editing a wordpress theme with hundreds of php files in multiple nested folders, finding where, say, line 349 in the compiled source code appears in the file structure? 例如,如果我正在使用多个嵌套文件夹中的数百个php文件来编辑wordpress主题,那么查找已编译源代码中第349行在文件结构中出现的位置吗?

The PHP language is interpreted and not compiled PHP语言被解释且未编译

Usually it will tell u the full path to the file when an error occurs . 通常,当发生错误时,它将告诉您文件的完整路径。

if not you can display it by using : 如果没有,您可以使用来显示它:

$path = dirname(__FILE__);

echo $path ;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM