Jump to content

imagejpeg help


dennismonsewicz

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.