Will imagedestroy () be deleted from disk

function png2jpg($originalFile, $outputFile, $quality) { $image = imagecreatefrompng($originalFile); imagejpeg($image, $outputFile.'.jpg', $quality); imagedestroy($image); } 

I use this to compress images, but I continue to search for my file, which I delete. Does imagedestroy () force this to save memory or it will also delete the output file.

+4
source share
1 answer

Not only in memory.

From the manual

imagedestroy () frees up any memory associated with the image of the image.

Use unlink () to delete a file

+5
source

All Articles