普通图像存储还是mySQL Blob? [英] Normal image storing or mySQL blob?
问题描述
我正在编写一个php/mysql网络应用程序,有点像一个博客平台,人们可以在其中上传和发布图片.
i'm programming a php/mysql web app which is kinda like a blogging platform where people can upload pictures and post them.
通过BLOB将这些图像存储到文件夹或mySQL表中的最佳方法是什么?
What is the best way to store these images , Storing them in a folder or in mySQL table through BLOB ?
我之所以这样问,是因为我想要最简单的方法,使我可以轻松地转移到另一台主机/服务器,而无需花费几天时间下载所有发布的图片并将其上传到新服务器.
i ask this because i want the most simple way which let me easily move to another host/server without spending days to download all posted pictures , and upload them to the new server.
可选问题:专用服务器是否足以启动博客平台?
Optional Question: Is a dedicated server enough for a started blogging platform?
谢谢
推荐答案
数据库外.当它不在数据库中时,您的Web服务器可以执行其工作,并使客户端缓存图像.使用数据库驱动的动态映像执行此操作更为复杂.另外,您会发现通过允许Web服务器处理它,您可能会获得更好的性能.
Out of the database. When it's out of the database your webserver can do its job and make clients cache the images. Doing so with a database-driven dynamic image is more complex. Additionally, you'll find you'll likely get much better performance by allowing the webserver to deal with it.
这篇关于普通图像存储还是mySQL Blob?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!