PHP to store images in MySQL or not?

前端 未结 16 2624
离开以前
离开以前 2020-11-28 05:56

I have built a small web application in PHP where users must first log in. Once they have logged in, I intend on showing a small thumbnail as part of their \"profile\".

16条回答
  •  执念已碎
    2020-11-28 06:17

    I recently saw this tip's list: http://www.ajaxline.com/32-tips-to-speed-up-your-mysql-queries

    Tip 17: For your web application, images and other binary assets should normally be stored as files. That is, store only a reference to the file rather than the file itself in the database.

    So just save the file path to the image :)

提交回复
热议问题