On Sun, 21 Jul 2002, Roberto Ramírez wrote:
> Is there a way to display an image withouth sending the headers first?

You have to send the header - that's how the browser knows what sort of 
image it is.

> I'm trying to display an inline image... but when I try it just only
> send the raw image data...
>
> I've thinking that I need to save an image first to disk and then
> display the image later... 

That's not necessary. 

<?

  if ($_GET['displayimage'] == 1)
  {
    header('Content-Type: image.gif');
    // output image data
    exit;
  }

  // rest of page goes here
  echo "<p>Hi there. Here is an image:
    <img src='{$_SERVER['PHP_SELF']}?displayimage=1'></p>";

?>

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to