| Posted by Christoph Burschka on 11/20/06 17:06 
petersprc wrote:> You can fetch the value from the db, then file_put_contents or fwrite
 > it into a file.
 >
 > You might also be able to use "select ... into outfile" with some
 > options...
 >
 > ttc wrote:
 >> Hy to all...
 >>
 >> I grab image from attachment in mail body and put whole body in
 >> database.
 >> Does someone maybe know how  to export  encoded image from database to
 >> directory on server.
 >>
 >> thnx
 >
 
 Note that the image is not binary data, but encoded. Before you can store it as
 a file, it needs to be decoded.
 
 Various types of encoding may have been used, this page lists some of them:
 http://pages.prodigy.net/michael_santovec/decode.htm
 
 If it is base64, there is a base64_decode() function in PHP that will allow you
 to decode the image and store it as a file.
 
 --
 Christoph Burschka
 [Back to original message] |