[英]Check to see if any files aren't being accessed in website
I've inherited a somewhat large web application which is a total mess in terms of code and has zero comments. 我继承了一个较大的Web应用程序,它在代码方面完全混乱,注释为零。 I want to start by removing all the files that aren't actually being used. 首先,我要删除所有实际未使用的文件。 Is there a quicker way to do this than trawl through each file looking for calls? 有没有比在每个文件中寻找呼叫更快的方法呢?
I know dreamweaver can do this but I really don't want to go that route... 我知道Dreamweaver可以做到这一点,但我真的不想走那条路...
I'm not sure but try eclipse. 我不确定,但尝试日食。 I think i saw there some profiler and try this get_included_files 我想我看到了一些探查器并尝试使用此get_included_files
On linux, use the stat command. 在linux上,使用stat命令。 Write a script to iterate over your files using the stat command. 编写脚本以使用stat命令遍历文件。 This will give you the last access time. 这将为您提供最后的访问时间。
$ stat testdisk.log
File: `testdisk.log'
Size: 1014 Blocks: 8 IO Block: 4096 regular file
Device: 805h/2053d Inode: 1448800 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2012-07-21 17:20:33.548997182 +0530
Modify: 2011-08-16 23:27:19.648480473 +0530
Change: 2011-08-16 23:27:19.648480473 +0530
To find included files you can also use PHPs built in function: 要查找包含的文件,您还可以使用内置的PHP:
array get_included_files ( void )
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.