简体   繁体   English

确定未使用哪些PHP源文件

[英]Determining which PHP source files are not used

我有一个大型的网络应用程序,我认为有一堆旧文件不再使用,是否有一个应用程序可以告诉我这些文件是什么?

There is also the Dead Code Detector (DCD) . 还有死代码检测器(DCD) It finds functions that are never called, which may help to clean up even the files you keep in production. 它找到从未调用过的函数,这可能有助于清理生产中保留的文件。

You should be able to start with your web server logs. 您应该能够从Web服务器日志开始。 These will show you which files ARE being used. 这些将显示正在使用的文件。 From there you should be able to track down a good number of the files those reference. 从那里你应该能够追踪那些引用的大量文件。 Don't know of a good way to find out which aren't being used, only those that are. 不知道找出哪些没有被使用的好方法,只有那些。

I think you need to check out the project management tools available for php. 我想你需要查看可用于php的项目管理工具。

You can have a look at phpUnderControl ( http://www.phpundercontrol.org/about.html ) and CruiseControl (you can google it). 你可以看看phpUnderControl( http://www.phpundercontrol.org/about.html )和CruiseControl(你可以google它)。

You can also use a tool (ie and IDE) that will give a Code Coverage Report. 您还可以使用将提供代码覆盖率报告的工具(即IDE)。

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

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