Jump to content

Archived

This topic is now archived and is closed to further replies.

education

Dead Simple For Someone Anyway..

Recommended Posts

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??

Share this post


Link to post
Share on other sites
Could do it with:
[code]<?php
foreach(glob("path/to/files/*.gif") as $file) unlink($file);
?>[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.