Could you tell me how to draw php graphics. When writing web code, php will write the code for drawing the image: the code is as follows header (& quot; content-type: image/gif & quot;); & nbsp; $ im = Imagecreate (, 6. could you tell me about php graphics.
When I write web code, php will write the code for drawing graphics: the code is as follows:
Header ("content-type: image/gif ");
$ Im = Imagecreate (200,60 );
$ White = imagecolorallocate ($ im, 159 );
Imagegif ($ im );
After being drawn, other php code in the file is garbled during execution.) but I can write this part of code into a separate file and save it to run properly, what is the problem? Which one do I use comprehensively? I use appserv.
------ Solution --------------------
Is it because your encoding is not uniform or you have output statements before header ()?
------ Solution --------------------
I don't know what you want to echo. to directly display images in a browser, no output can be provided.
By taking a detour, embed an HTML code into those lines in createyouimage. php.
------ Solution --------------------
Since the image is generated, of course, the file should contain image data. You cannot add other things.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.