What is the best PHP upload files to database class? #upload files to database
Edit
by Letumile Keoreng - 8 years ago (2016-12-07)
Upload doc and pdf documents to a database using php
| I want to create a Web page that can upload and save doc and pdf files in a database, also keep count of how many documents uploaded. |
Ask clarification
2 Recommendations
This class can save and load binary files in databases using PDO.
It can execute SQL queries using PDO to update a database table record with a LOB field that holds binary data.
The class can also execute a query that retrieves a LOB field value of a given record.
| by zinsou A.A.E.Moïse package author 6835 - 7 years ago (2017-11-29) Comment
this can be a starting point. |
This class can serve images added to a MySQL database table.
It can execute SQL queries to store uploaded images files in a given MySQL table.
The class can also retrieve from the database table and serve image data for displaying as the current script output, retrieve the list of all images stored in the database, replace a given image already stored in the database table, and delete a given image from the database.
| by Manuel Lemos 26695 - 8 years ago (2016-12-07) Comment
In general it is not a good idea to store files in a database because it is slow to store and retrieve.
But if your files are small it may not affect much your application.
This package is not specific to Word Doc or PDF files. It is more for images but you can adapt it to work with other types of files. |