html display images without intermediate file

From: paul(at)mybofy(dot)net
To: pgsql-php(at)postgresql(dot)org
Subject: html display images without intermediate file
Date: 2014-04-09 16:01:16
Message-ID: 007D0FCB-F62D-4485-8A24-BEED4102A912@mybofy.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php


Bonjour
code working :
$link = pg_Connect("host=localhost dbname=... user=... password='...'");
$res = pg_query($link, "select miniature from photo ");
$numrows = pg_numrows($res);
for($ri = 0; $ri < $numrows; $ri++) {
$row = pg_fetch_array($res, $ri);
$img = pg_unescape_bytea($row['miniature']);
$fln = "toto".$ri.".jpeg";
file_put_contents($fln, $img);
echo "<img src='".$fln."'/>";
}
How to do without the intermediate file $fln ?
Merci

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Vincent 2014-04-09 17:17:24 Re: html display images without intermediate file
Previous Message Archana K N 2014-01-22 18:35:32 Re: Data missing from table........