Re: How to send bytea data straight to browser (as in pg_loreadall)?

Поиск
Список
Период
Сортировка
От Frank Joerdens
Тема Re: How to send bytea data straight to browser (as in pg_loreadall)?
Дата
Msg-id 20020401210937.B13198@superfly.archi-me-des.de
обсуждение исходный текст
Список pgsql-php
On Mon, Apr 01, 2002 at 08:31:01PM +0200, Frank Joerdens wrote:
[ . . . ]
> understand some crucial point about how this works. How do you present
> an image to the browser without actually creating a file for it? The
> built in function pg_loreadall appears to do exactly that. I'd need to
> replicate that functionality for bytea.

An addition: Actually, just echoing the stripcslashed string to the
browser works just as with pg_loreadall if I put the script that does
the echoing into a teensy little html page as in

<img src="show_image.php">

where show_image.php is just a script that does

echo stripcslashes(pg_result($result, 2, image));

(after doing the sql stuff, that is).

Which means that I know how to do it without a tmp file. However, I
still don't understand the mechanism and I still don't know how to do it
in a single script. It appears that you have to provide a file path for
the <img src . . . tag. Can you do that *within* a script without
creating a tmp file somehow?

Regards, Frank

В списке pgsql-php по дате отправления:

Предыдущее
От: Tomaz Borstnar
Дата:
Сообщение: Many "pq_flush: send() failed: Broken pipe" after upgrading from php 4.0.x to php 4.1.x
Следующее
От: Frank Joerdens
Дата:
Сообщение: How to send bytea data straight to browser (as in pg_loreadall)?