Re: How to show BLOB ?
| From: | CPT John W. Holmes | Date: | Tue, 10 Jun 2003 13:29:51 +0000 |
| Subject: | Re: How to show BLOB ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-150905@lists.php.net to get a copy of this message | ||
> I have a blob in the database. I want to open a file=BLOB in the browser
such
> a way as if I clicked on a link. So if it is pdf, its opened by pdf
plugin,
> if it is doc, it is open by word plugin, if it is zip the dialog for
> opening/saving to disk is opened, if it is jpeg it is directly displayed
in
> the browser. The header() function with Attachment doesn't work. Any idea
how
> to achieve this effect without writing the BLOB to a temporary file
somewhere
> on the disk and opening this file ???
You need to get header() to work. Use header() to deliver the correct
content-type for the file, then echo the $BLOB data. That's it. Show your
code if it's not working.
---John Holmes...