开发者

mysql db image convert to file

Hi i am writing a converter from Oracle to mysql

In Oracle the images are stored in db.

I want to read the content of the image and save to file system

I suppose that i have to read the blob entry and using php file commands create the file (am i right)

What about image type. Should i save as jpg (what if the store image is not j开发者_如何转开发pg)

Any suggestion are welcome


you can write the blob directly to a file on disk. you can exclude the file extension from the name if you don't have that information somewhere in the db or the app. you could also deduce the content type by using the unix file command if you really need to assign an extension.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜