Saving images in database mysql

前端 未结 5 1480
没有蜡笔的小新
没有蜡笔的小新 2020-11-30 13:08

My client have created a script in php+mysql that saves images directly in the database and every images has url like this: www.example.com/image.php?id=421

In your

5条回答
  •  温柔的废话
    2020-11-30 13:58

    Just because it can be done, doesn't mean it should be.

    I always store meta data about the images (filename, location, other attributes) in the database, and store images externally in the file system. There is very little benefit, imo, of actually storing images in an SQL database. Once they are in there, they are very inconvenient to use.

提交回复
热议问题