Jump to content


Photo

Dead Simple For Someone Anyway..


  • Please log in to reply
1 reply to this topic

#1 education

education
  • Members
  • Pip
  • Newbie
  • 9 posts

Posted 27 July 2006 - 12:32 PM

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??
Emotions="inactive"

#2 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 27 July 2006 - 01:01 PM

Could do it with:
<?php
foreach(glob("path/to/files/*.gif") as $file) unlink($file);
?>





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users