dennismonsewicz Posted March 2, 2010 Share Posted March 2, 2010 I am trying to create a jpeg image and its not saving the image to my server... // Create a 100*30 image $im = imagecreate(100, 30); // White background and blue text $bg = imagecolorallocate($im, 255, 255, 255); $textcolor = imagecolorallocate($im, 0, 0, 255); $ranstr = 'Hello World'; // Write the string at the top left imagestring($im, 5, 0, 0, $ranstr, $textcolor); if(imagejpeg($im, 'images/test.jpg') === TRUE) { echo 'SUCCESS!'; } else { echo 'FAIL!'; } The images folder is set to 777, any ideas? Link to comment https://forums.phpfreaks.com/topic/193928-imagejpeg-help/ Share on other sites More sharing options...
teamatomic Posted March 2, 2010 Share Posted March 2, 2010 If its not working its because you dont have the correct path. Try: ./images/test.jpg or the full path HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/193928-imagejpeg-help/#findComment-1020581 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.