Php quickie

fez

fez

Caporegime
Joined
22 Aug 2008
Posts
28,008
Location
Tunbridge Wells
Hi guys,

Just a quick question for a php guru. I have created a gallery cms and part of this is creating some thumbnails and medium images which are generated from the master image the user uploads.

It all works fine using imagejpeg(myimage, target save location) however I want to make sure that the program only continues into creating the other images if the previous one has worked. I dont want to enter a DB record if one of the image creations has failed.

So how to I check the success of the imagejpeg() function.

Thanks
 
Hi guys,

Just a quick question for a php guru. I have created a gallery cms and part of this is creating some thumbnails and medium images which are generated from the master image the user uploads.

It all works fine using imagejpeg(myimage, target save location) however I want to make sure that the program only continues into creating the other images if the previous one has worked. I dont want to enter a DB record if one of the image creations has failed.

So how to I check the success of the imagejpeg() function.

Thanks


There's an example on the php site in the comments section for that function http://www.php.net/manual/en/function.imagejpeg.php#89866 - towards the bottom of his comment.
 
Back
Top Bottom