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 文件实际被使用,哪些没有?


基础教程推荐
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何替换eregi() 2022-01-01