开发者

Codeigniter/PHP: Image db storage?

开发者 https://www.devze.com 2023-02-04 07:22 出处:网络
If I want each user in my web app to be able to upload about 6 pictures with a description, wh开发者_JAVA技巧at is the best way to store that info in the db?

If I want each user in my web app to be able to upload about 6 pictures with a description, wh开发者_JAVA技巧at is the best way to store that info in the db?

How would you do it?


i would save the image files to a location in the file system. then, keep a database table for images that contains id, filepath, description. you may also want to keep other info in the image table as well, for instance, which user the image belongs to, and which is the main image, width, height, etc.

0

精彩评论

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

关注公众号