Problems with displaying an image

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I found in the internet the following web page">

There is the description of the method of adding a graphical file into a
database. When I try to display the added image from database I receive

TExifMM* ?|(,?ivEastman
Kodak CompanyDC210 Zoom (V05.00),H,P0110X''l'
 t'|' "' '"'''' ' '|H?( 2003:02:07
02:04:462 (  d, 1| ( 5DCP00721.JPG >@?`<ʶ
`H HQ(

instead of a picture. Is there any bug in the presented code or do I have to
configure anything in my php?

Re: Problems with displaying an image

your html has to contain some line like that

and your php script that generates the image must sent the right
header, i.e.

header("Content-type: image/IMAGE_TYPE"); and that before any other


Re: Problems with displaying an image

Joker wrote:
Quoted text here. Click to load it

I'm rather sure that you've forgotten to send the Content-Type header
before the data itself. The header tells browser which kind of data can
be expected.

Header("Content-Type: image/jpeg");

If the header is sent and the data is still incorrect, the content-type
header might be invalid.


Site Timeline