PHP & Large Object

Поиск
Список
Период
Сортировка
Искать

PHP & Large Object

От:
"Enrico Comini" <algobit@algobit.com>
Дата:
Hi,
I' m a newbie with BLOBS.
I have pg-database with images in large object.
I read (with php) the blob but how to see this image ?
 
.......
pg_exec ($conn, "begin");
    $handle=pg_loopen($conn,68129,"r");
    $img=pg_loreadall($handle);
    pg_loclose($handle);
pg_exec ($conn, "end"); 
 
echo "<img src=\"$img\" border=0>";

So i see only the blob like a sequence of chars
 
Thanks,
                Enrico

Re: PHP & Large Object

От:
Vic <vic@dcc.dp.ua>
Дата:
 Hi  Enrico!  I try  many times this  sample with  one result  -  image  was
fill  browser   as "sequence of  chars"  -  i see "dirty screen".  I  start  from
Postgres 6.5.3 and 1.3.6 with PHP 3.0.17,
but  in  other versions - systems i get a same result .

And   in febrary  this year  I  found in   one conf   sample   --- it
work  in  my  intranet. Try it.  I think   this trouble must be fixsed  and sample  added in
FAQ :-) )
>----------------------------------------------------------------------------------------------------------------------------------

FILE "image.php3"

>----------------------------------------------------------------------------------------------------------------------------------

FILE "ti.htm"




>----------------------------------------------------------------------------------------------------------------------------------

Bye.

         Vic






Re: PHP & Large Object

От:
Tom Samplonius <tom@sdf.com>
Дата:

On Tue, 19 Sep 2000, Enrico Comini wrote:

> echo "";
> 
> So i see only the blob like a sequence of chars

 You must output a "Content-Type" header as appropriate for the type of
file you are sending out.

Tom


FAQ