How to tell which PHP files are actually used and which are not?(如何判断哪些 PHP 文件实际被使用,哪些没有?)
问题描述
我有一个大型 PHP 网站,我现在要处理它.它包含数百个单独的 PHP 文件,但我怀疑只有不到一半真正被使用.其中大部分可能都可以删除.
I got a large PHP website which I'm now about to take care of. It contains hundreds of separate PHP files, but I suspect only less than a half is really being used. Most of them probably can be deleted.
但我真正想做的最后一件事是检查每个文件的代码并检查其是否链接、包含、需要...等.给其他人或是否可以安全删除.
But the last thing I really want to do is going through the code of each file and check whether its linked, included, required...etc. to others or whether it can be safely deleted.
你知道是否有任何工具可以做到这一点?
Do you know whether there's any tool which is capable of doing this?
推荐答案
看看phpxref,它可能会满足您的需求.
Take a look at phpxref, It might do what you need.
交叉引用 PHP 类、函数、变量、常量和 require/include 用法.
Cross-references PHP classes, functions, variables, constants and require/include usage.
这篇关于如何判断哪些 PHP 文件实际被使用,哪些没有?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何判断哪些 PHP 文件实际被使用,哪些没有?


- 如何定位 php.ini 文件 (xampp) 2022-01-01
- Laravel 仓库 2022-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 没有作曲家的 PSR4 自动加载 2022-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01