I got the idea .. and I will work on it
thanks a lot
"Jim Grill" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > Dre wrote:
> > > line 8 is <?php
> > >
> > > just that .. and the code before it is the following
> > >
> > > //==================================================
> > > <html>
> > > <head>
> > > <title>Untitled Document</title>
> > > <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
> > > </head>
> > >
> > > <body>
> > > //==================================================
> > >
> >
> > That is the output I mentioned.
> >
> > And output either html OR image, you cannot output both. Try yourself,
> > open a image file (gif, jpg...) in a text editor and put html code in
> > it, then save it. Obviosly, you'll get broken image file.
> >
>
> As others have mentioned, you cannot output *anything* at all before
> modifying headers. If your script outputs even a space, headers are sent.
> Headers can only ever be sent one time per request. The solution: make a
> separate request for the image.
>
> To get around this problem put your image fetching code into a separate
> script and call it with an image tag. Ideally, you would have saved the
> image sizes in a separate column so you might select only the id (or name
of
> the image) and the size in your main script and then call the second image
> fetching script like so:
> <img src="image.php?img_id=$id" width="$width" height="$height" border="0"
> />
>
> The $id, $width, and $height would have come from your db. Save the actual
> fetching of the image itself for image.php.
>
> Good luck and have fun!
>
> Jim Grill
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >

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

Reply via email to