PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have around 500 images each of 70 to 100kb. I want to store it on the webserver.
I can store it by directly uploading it (standard way we do it) or can upload to database as medium blob.
The upside of storing the images in database is that i can easily have number of views and rating using table fields but i have been suggested by many friends that storing on database using blob is not preferable.
aceconcepts wrote:Just store the filename in a db table and make reference to the image on server via dir path when you want to display it.
I would do this as well. If you're worried about file names just generate a long random string, md5/substr it and attach it to the end of each image. Then just include the random code/file name in the database.