Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Paul Scott  >  MySQL File System  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example Script
Class: MySQL File System
Store and retrieve files in a MySQL database BLOBs
Author: By
Last change:
Date: 2005-06-08 23:07
Size: 386 bytes
 

Contents

Class file image Download
<?php
//include the mysql storage class
include("mysql_filesystem_class_inc.php");

//set up the storage object. 
$storage = new mysql_filesystem('localhost','3306','root','secret','mydbname');

//use an upload form to get the file onto the server
//store a file in the db
$storage->uploadProcess('example.txt','text/plain');

//retrieve the file with id = 1
$storage->getFile('1');

?>