Jbert2 Posted July 9, 2008 Share Posted July 9, 2008 header ( 'Content-Type: image/jpeg' ); imagejpeg($im, "images2/". $prefix . $filename, 100); imagejpeg($im); imagedestroy($im); The code does 2 things. displays the new image and saves it to folder 'images2' Problem is all saves overwrite image. How can I save to the folder with no overwrite Thanks JIM Link to comment https://forums.phpfreaks.com/topic/113846-adding-image-to-folder/ Share on other sites More sharing options...
l0ve2hat3 Posted July 9, 2008 Share Posted July 9, 2008 header ( 'Content-Type: image/jpeg' ); if(!file_exists("images2/". $prefix . $filename)) imagejpeg($im, "images2/". $prefix . $filename, 100); imagejpeg($im); imagedestroy($im); Link to comment https://forums.phpfreaks.com/topic/113846-adding-image-to-folder/#findComment-585044 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.