Hi

imagedestroy()http://au.php.net/imagedestroy

I was just wondering because php.net states in the manual that it destroys the memory associated with the image rather than the image stored in the "/tmp" folder. Is this true?

Also how can you change your default tmp directory?
I think you go into the php.ini file and change a "temp line"?

Thanks, X

imagedestroy() is used to free memory assigned to an image resource stream. I haven't tried it out, but I assume it can be used to free any image resource stream created by the GD package.

By tmp folder, are you referring to file upload tmp folder? If so, open the php.ini file and search for upload_tmp_dir. This is the setting that needs to be adjusted.

EDIT: Actually I just followed my own advice and found that the tmp directory for the upload_tmp_dir in my php.ini file is set to more than one setting, so it may need to be changed in more than one place in the ini file.

commented: Thanks for the advice. +2
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.