PHP Classes

FileDB: Stores (binary) files in a database

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 65%Total: 2,993 All time: 1,240 This week: 71Up
Version License Categories
filedb 1.0GNU Lesser Genera...Databases, Files and Folders
Description 

Author

With this class you can easily store, display and send files from a db.
It has a built-in hit counter and stores information of last edition, upload, etc..


This class uses my db abstraction layer, AbstractDB
(http://www.phpclasses.org/browse.html/package/846.html) , which allows a unified and easy access to databases, which you can see in this class.


CONSTRUCTOR:
function FileDB(&$db, $host, $database, $user, $password)

FUNCTIONS:
function add($file_name, $file_descr = '')
function remove($id)
function get($id, $addHit = true)
function getWhere($from, $where = '', $addHit = true)
function getFile($id, $addHit = true)
function getFileData($id)
function getIds()
function sendFile($id)

function _getFileContent($file_name)

PUBLIC VARS:
var $file_count

Picture of L
Name: L <contact>
Classes: 13 packages by
Country: Germany Germany

  Files folder image Files (6)  
File Role Description
Accessible without login HTML file FileDB.html Doc. php doc
Plain text file FileDB.php Class main class
Plain text file files.sql Conf. sql definition
Accessible without login Plain text file showFile.php Appl. example
Accessible without login Plain text file testFileDB.php Example example
Accessible without login Plain text file testFileDB2.php Example example using Uploader.php

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:2,993
This week:0
All time:1,240
This week:71Up
 User Ratings  
 
 All time
Utility:81%StarStarStarStarStar
Consistency:93%StarStarStarStarStar
Documentation:75%StarStarStarStar
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:65%StarStarStarStar
Rank:656