education Posted July 27, 2006 Share Posted July 27, 2006 Hi i have a CAPTCHA script that stores images in a folder, i need to delete these files periodically say every 6 Hours.I need a simple php script that will do this that i can run from my cron task. How do i go about doing this?? Quote Link to comment https://forums.phpfreaks.com/topic/15800-dead-simple-for-someone-anyway/ Share on other sites More sharing options...
zq29 Posted July 27, 2006 Share Posted July 27, 2006 Could do it with:[code]<?phpforeach(glob("path/to/files/*.gif") as $file) unlink($file);?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/15800-dead-simple-for-someone-anyway/#findComment-64626 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.