PHP Classes

File: showFile.php

Recommend this page to a friend!
  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: 21 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']);
}
////////////////////////////////////////////////////////////////////////
?>