Possible Duplicates:
Inserting images into a database Store images in database or 开发者_StackOverflow中文版on file system
Hi,
I want to insert product image to database using php. please help me out.
Are you sure you really want to store images in the database? Its faster to upload the image to the file system and store its location in the database, faster in both upload and accessing.
If however it is storing images as binary in the DB for security for example:
Google Has Many Answers
Like:
Tutorial Storing Images MySQL PHP
There are two ways to do this.
- Insert Binary data for the image.
- Insert location of image into database and keep image file at a place accessible by your application.
精彩评论