PHP Classes
elePHPant
Icontem

File: showFile.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of L  >  FileDB  >  showFile.php  >  Download  
File: showFile.php
Role: Application script
Content type: text/plain
Description: example
Class: FileDB
Stores (binary) files in a database
Author: By
Last change:
Date: 12 years ago
Size: 678 bytes
 

Contents

Class file image Download
<?php
////////////////////////////////////////////////////////////////////////
/*
    displays file content
*/
////////////////////////////////////////////////////////////////////////
if (@$HTTP_GET_VARS['id']) {
   
    require
'FileDB.php';
    require
'../abstractdb/AbstractFactory.php';
   
   
$host = 'localhost';
   
$database = 'ebm';
   
$user = '';
   
$password = '';
   
$db = AbstractFactory::getDBLayer('MYSQL', '', '');
   
$filedb = new FileDB($db, $host, $database, $user, $password);
    echo
$filedb->getFile($HTTP_GET_VARS['id']);
}
////////////////////////////////////////////////////////////////////////
?>