??using php generated pictures with HTML???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Joost van Beek

    ??using php generated pictures with HTML???

    Hi,

    I am able to create images with the use of the GDLIB.
    but I am not able to use these images together with HTML. I always get the
    message "headers are already sent. Can anyone give me an example?

    Thanx.


  • Daniel Tryba

    #2
    Re: ??using php generated pictures with HTML???

    Joost van Beek <joost@home.n l> wrote:[color=blue]
    > I am able to create images with the use of the GDLIB.
    > but I am not able to use these images together with HTML. I always get the
    > message "headers are already sent. Can anyone give me an example?[/color]

    It would be easier if you had posted part og your script... Now we have
    to guess what you did wrong. My guess is that you are trying to
    accomplish the task in 1 script(call)... Thats not possible. You need
    one script to spit out the html and other scripts to handle images
    (ofcourse these scripts can be one with different parameters).

    Some html:

    <img src='foo.php?im age=1'>

    where foo.php:

    <?php
    header('Content-Type: image/jpeg');

    //gdstuff
    ?>

    --

    Daniel Tryba

    Comment

    • Michael Fuhr

      #3
      Re: ??using php generated pictures with HTML???

      "Joost van Beek" <joost@home.n l> writes:
      [color=blue]
      > I am able to create images with the use of the GDLIB.
      > but I am not able to use these images together with HTML. I always get the
      > message "headers are already sent. Can anyone give me an example?[/color]

      Please show us the code you're using (as short as possible, while
      still complete enough to demonstrate the problem). Don't be satisfied
      with just learning the right way: learn why the wrong way is wrong.

      --
      Michael Fuhr

      Comment

      Working...