[英]Check to see if any files aren't being accessed in website
我繼承了一個較大的Web應用程序,它在代碼方面完全混亂,注釋為零。 首先,我要刪除所有實際未使用的文件。 有沒有比在每個文件中尋找呼叫更快的方法呢?
我知道Dreamweaver可以做到這一點,但我真的不想走那條路...
我不確定,但嘗試日食。 我想我看到了一些探查器並嘗試使用此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 )
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.