which can have the effect of tripling the data size, just so you keep
that in mind when setting up your db

On 12/5/06, Brian French <[EMAIL PROTECTED]> wrote:
>
> also, if you want to store the data of the file in the database instead
> of just in a file, you should also base64_encode(); the data before
> saving it to either a blog or text datatype.
> when you want to retreive you do:
>
> <?php
> // header to let the browser know what type of file it is
> // saee http://us2.php.net/header if you want to know how to make the
> file downloadable
> header('Content-type: '.$var['MyFileModel']['type']);
> // output the file itself
> echo base64_decode($var['MyFileModel']['datafield']);
> ?>
>
>
> >
>


-- 
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to