Reply to Re: MySql and images

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация