Jump to content

Recommended Posts

Hello,

Im currently working with gd library.. i making this page that dynamically generates an image using php, but the thing is i want to add some text to this page and it doesnt seem to work, i m guessing it has something to do with the header's content type, its right now set as image/gif... i just dont know how to change the header so it accepts both html codes and the image with gd lib.

anyone can help?? thanks
Link to comment
https://forums.phpfreaks.com/topic/5123-header-problems/
Share on other sites

You can't send both. It's either an image, or an html page, not both.

The best way to do what your wanting is to write your html page, then where you want the image to appear, use an img tag and for the src use the url of the page that generates the image.


[code]<h1>some html</h1><br />
<img src="./imagepage.php" alt="this is an image">[/code]
Link to comment
https://forums.phpfreaks.com/topic/5123-header-problems/#findComment-18182
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.