strange image display
Posted: Thu Apr 24, 2008 8:08 pm
Hey, I wrote some code to display images on our website. It worked fine before I modified other irrelevant code, at least I think. All of sudden, those images are not displayed any more yet I can still see the content as text/html type, not as the supposed image/jpeg type. Below code used to display images:
Thanks a lot in advance
where $img and $img_type the image and its corresponding type stored in database and I even printed out the value of $img_type on the page:$result = db_query ($sql_get_image);
$img = db_result_bin($result, 0, "$mode_trns");
$img_type = db_result($result, 0, "${mode_trns}Type");
header("Content-Type: $img_type");
echo $img;
However, no image displayed and the page info on firefox says:image_type: image/jpeg
Can some tell me where my problem is?Type: text/html
Thanks a lot in advance