|
Posted by Andrea Scharfe on 04/30/07 09:31
I do the image generation with an external programme (gnuplot), so the
images are not generated by PHP directly.
I now found the following solution, which seems to work quite well:
/* remove older images in folder temp */
$command = "ls ".$_CONFIG["tempdir"];
exec($command, $output, $retval);
$time = time();
foreach ($output as $file) {
if (($time-filemtime($_CONFIG["tempdir"]."/".$file))>300) {
unlink($_CONFIG["tempdir"]."/".$file);
}
}
Thanks for your comments!
Andrea
Navigation:
[Reply to this message]
|