Reply to Re: Delete temporary images after loading website

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация