|
Posted by monomaniac21 on 01/14/06 15:10
Robert Lummert wrote:
> Marc,
>
> you can put your binary data into a blob field (say named doc) using
> straight sql just like:
>
> $sql = 'update mytable set doc=0x';
> $fh = fopen($_FILES['userfile']['tmp_name'],'rb');
> while(true) {
> $chunk = unpack('H*chunk',fread($fh,512));
> $sql .= $chunk['chunk'];
> if(strlen($chunk['chunk'])<512) break;
> }
> fclose($fh);
Robert how do you then retrieve this data, as a word document that can
be opened right away?
Kind regards
Marc
Navigation:
[Reply to this message]
|