You are here: Delete temporary images after loading website « PHP Programming Language « IT news, forums, messages
Delete temporary images after loading website

Posted by Andrea Scharfe on 04/30/07 08:24

Hi there,

I am writing a PHP script which generates some charts using gnuplot.
This generates quite a large number of temporary image files. My
problem is that I do not know how to delete these images after they
have been loaded and are already displayed at the website.
Everything I have tried so far resulted in that the images were not
displayed at all.
I already tried something like:

sleep(10);
foreach ($images as $i) {
unlink($i);
}

also tried writing a shell script with the same functionality hoping
that starting the shell script in the background (using &) would
terminate the php script before the images were deleted.
Didn't work either.
Does anyone have an idea? I do not want to use a cron job or something
to clean the temporary directory.
Are there any php only solutions to this problem?

Cheers!
Andrea

 

Navigation:

[Reply to this 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

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