Subject Re: [firebird-php] FB+PHP - Display image
Author Milan Babuskov
Jean Lopes - TSA wrote:
> I had a database with jpg images stored in a sub-type 0 blob filed.
>
> I tryed to display this images using the follow script:
>
> .
> .
> .
> $data = ibase_fechtobject($query);
> $blobdata = ibase_blob_info();
> $pic = ibase_blob_get,$data->FOTO,$blobdata[0]);
> header("content-type : image/jpeg");
> print_r($pic);
> ...close database etc.
> .
> .
> .
> But my browser show me only character like the image is a text.
>
> anybody have an exemple to share with me ?

Quoted post from this list (25.06.2003.)

$sst = "SELECT image, image_type FROM images_tbl WHERE images_id=123";
$result = ibase_query($sst, $f);
if(empty($result)) echo SQL_error($f,$sst)."<BR>";
$tmprow=SQL_fetch_object($result,0);
$image = $tmprow->image;

header("Content-type: ".$tmprow->image_type);
headers_sent();

ibase_blob_echo($image);

I guess the problem is capital C in Content-type

--
Milan Babuskov
http://fbexport.sourceforge.net