RE: [PHP] Previous Discussions
| From: | Ian Samuel | Date: | Tue, 28 May 2002 14:59:33 +0000 |
| Subject: | RE: [PHP] Previous Discussions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-99485@lists.php.net to get a copy of this message | ||
>>Is anyone aware of previous discussions with php/mysql with
>using file
>>inside the db (BLOBs) and integrating php to serve these files? In my
>>opinion, I'm sure there's a better way than store to a temp
>file and send
>>user the hyperlink, then deleting the temp file. Perhaps
>something with
>>output buffering, etc.
Regardless of whether this is a good idea or not, it's fairly easy. Store
the file data itself (accessible via fopen($whatever)) in a longblob, then
write it back with the appropriate headers ("Content-type: iamge/jpeg" or
whatever) when the time comes. I'd be happy to provide examples if anyone is
curious.
Regards,
Ian Samuel