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

后端 未结 6 2282
心在旅途
心在旅途 2020-11-22 05:21

How can I insert an image in MySQL and then retrieve it using PHP?

I have limited experience in either area, and I could use a little code to get me started in figur

6条回答
  •  渐次进展
    2020-11-22 05:57

    Personally i wouldnt store the image in the database, Instead put it in a folder not accessable from outside, and use the database for keeping track of its location. keeps database size down and you can just include it by using PHP. There would be no way without PHP to access that image then

提交回复
热议问题