View Single Post

  #4 (permalink)  
Old 03-25-2005
Kevin
 
Posts: n/a
Default Re: how to display the data of an image file

never mind, I have gotten the answer. thank you all.

"L¨¡?ie Techie" <laie@win_remove_get_nospam_solutions.com> дÈëÓʼþ
news:1111732373.9ebc38615521a8cd8e0f9fb66ebdd2a6@t eranews...
> On Fri, 25 Mar 2005 01:00:55 -0500, Kevin wrote:
>
> > Hi all,
> >
> > Assuming I have stored the binary data of an image file in a blob field

of
> > a table, how can I display it as an image in a web page? I found some
> > instructions on the web, such as
> >
> > header('application/octet-stream');
> > echo $imgdata;

>
> First mistake - send the proper Content-type header! If it's a JPEG, tell
> the browser it's a JPEG.
>
> >
> > I don't know why I always get this warning.
> >
> > ----------------
> > Warning: Cannot modify header information -------------
> >
> > How can I get rid of it and show the image as an element of the current
> > web page?

>
> That means some content was already sent. Check for any whitespace before
> your PHP code.
>
> HTH,
> La'ie Techie
>



Reply With Quote