I have a problem where somebody cancels the process of an image being uploaded, yet it somehow still gets to the server. The PHP code handles the uploaded file, yet the file is corrupt (or incomplete). Later, PHP code tries to do a createimagefromjpg() on the file and everything blows up with a Fatal Error.
Is there a way in PHP to detect if an image file is valid before calling this function? I don't believe there is a way to trap a Fatal Error.
Thanks,
-David
Is there a way in PHP to detect if an image file is valid before calling this function? I don't believe there is a way to trap a Fatal Error.
Thanks,
-David