Problem of output image with header and imagejpeg
Headers (' Content-type:image/jpeg ') and imagejpeg ($img) can output images, but there is no way to output other content at the same time, such as a paragraph,
If you use Imagejpeg ($img, ' path '), first save the image and then output to refresh the page.
What can be achieved: on the same page, with the form input parameters, using GD2 to make an image, and then output the image on this page, keep the content of HTML, do not refresh.
I novice, may problem level is lower, everybody haihan.
------to solve the idea----------------------
Imagejpeg ($img, ' path ');
Echo ';
Give it a try.
------to solve the idea----------------------
Package the image you need to output separately, the path can be http://www.example.com/action/method/
Add an image tag display to the HTML that you want to output at the same time.
...
...