I am adding some text to an image using PHP and then outputting it using:
header('Content-type: image/jpeg');
imagejpeg($rImg, NULL, 100);
The image is displayed correctly, but when I right click to save the image, it saves it as a PHP file and not an image. What am I doing wrong?
you have add a header for the file name
example:
(can use ‘inline’ or ‘attachment’)