RE: [PHP] GD functions don't delete temporary files
| From: | Jay Blanchard | Date: | Mon, 13 Dec 2004 15:21:11 +0000 |
| Subject: | RE: [PHP] GD functions don't delete temporary files | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-204180@lists.php.net to get a copy of this message | ||
[snip]
> Yes. You will have to write your own clean-up code for things like
this.
I don't mean any user generated temporary files, I mean files which are
created by the PHP function ImageGIF(). How should I even know which
temporary file name GD chose in each case, or whether it created a temp
file at all in a particular case?
[/snip]
Before the image is created you can get an array of things in the temp
file, then check for a new thing after the image is created. You can
verify the file type and if all is kosher, delete it.