I'm experiencing an error while saving an image with my imagejpeg()
function.
$tempFile = 'temp/'.$fbme['id'].'.jpg'; imagejpeg($cardImg,$tempFile,90); saveTrackingRecord($fbme['id'], $randomPicIdx);
This is the error:
Warning: imagejpeg() expects parameter 1 to be resource, boolean given
Please help. Thank you so much in advance.
Update
Here is how I initially defined $tempfile
.
$tempFile = 'temp/'.$fbme['id'].'.jpg?time='.time();
Here is how I am giving o/p:
<img src="<?php echo $tempFile.'?time='.time(); ?>" style="width:90%; max-width:400px;"/></center><br/>