检查是否有文件';t在网站中被访问


Check to see if any files aren't being accessed in website

我继承了一个有点大的web应用程序,它的代码非常混乱,没有任何注释。我想从删除所有没有实际使用的文件开始。有没有比在每个文件中搜索电话更快的方法?

我知道dreamweaver可以做到这一点,但我真的不想走那条路。。。

我不确定,但试试eclipse。我想我看到了一些探查器,并尝试了这个get_included_files

在linux上,使用stat命令。编写一个脚本,使用stat命令对文件进行迭代。这将给您最后一次访问时间。

$ 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

要查找包含的文件,您还可以使用内置的PHP:功能

array get_included_files ( void )