开发者

how can we store image in database (mysql with php) [duplicate]

This question already has answers here: 开发者_如何学Go Closed 11 years ago.

Possible Duplicate:

How can I store and retrieve images from a MySQL database using PHP?

i want store and fetch image from mysql database. is anybody i have knowledge about this.

Thanks in advance. Ravi Sharma


You can store the image contents (use file_get_contents function) into field of type BLOB. Another solution to decode binary data with function base64_encode and store in simple TEXT type field.


You can store images in a Blob-type column.

Check out the comprehensive tutorial here


You do not want to store images in your database. You want to use the filesystem and only store image meta data in the database, like the filesystem path.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜