douchao0358
douchao0358
2011-11-09 17:48

递归删除小文件PHP脚本

已采纳

How to recursively delete small files, smaller than 10 kilobytes regardless on their creation time, format or name?

PHP script needs to go through cache folder and all sub folders and delete files smaller than 10 KB. It would be nice to show list of deleted files, but it is not must. Also it would be nice if script can be set via cron job, but also it is not must, it can do manually too.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • douguachan2879 douguachan2879 10年前

    Looking into things such as the readdir function and unlink would be a good start for this project.

    点赞 评论 复制链接分享

相关推荐