Jump to content


Photo

header problems


  • Please log in to reply
4 replies to this topic

#1 DarKneZz

DarKneZz
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 17 March 2006 - 12:04 AM

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

#2 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 17 March 2006 - 12:40 AM

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.


<h1>some html</h1><br />
<img src="./imagepage.php" alt="this is an image">


#3 cunoodle2

cunoodle2
  • Members
  • PipPipPip
  • Advanced Member
  • 602 posts

Posted 17 March 2006 - 12:40 AM

Create a page that has the text you want on it. Then on that same page "Call" this 'random' pic you are reffering to.

If the code was working and now it's not, something changed. Did you change any code?

yeah, just a little bit, I am trying to start from beginning and trace my steps to see what i did wrong unless you see it.


#4 DarKneZz

DarKneZz
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 18 March 2006 - 12:05 PM

thanks, and what do you mean by call?? is that a function in php?

#5 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 18 March 2006 - 12:43 PM

I guess cunoodle2 was refering to hitman6003 post. I would recomend hitman6003's way. and not there is no call functions.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users