Am lookin gto set up a cron job to empty the image_cache folder regulkarly rather than me logging in everytime to do this (as its getting far too regular.
The cron job is fine, but just need to make sure I have got a script that will do what I need to do.
Would this be right?
$path = "/home/accountname/public_html/images/image_cache/";
foreach(glob($path . "*") as $file)
if(is_file($path . $file))
unlink($path . $file);
and assuming that thats correct, do I just save that as a .php, put it in the root and then run the cron from that file?