PHP Classes

File: exemple.php

Recommend this page to a friend!
  Classes of András Zoltán-Gyárfás   Upload and list files   exemple.php   Download  
File: exemple.php
Role: Example script
Content type: text/plain
Description: Exemple
Class: Upload and list files
Display and process forms to upload files
Author: By
Last change: The documentation language changed
Date: 15 years ago
Size: 519 bytes
 

Contents

Class file image Download
<?php
/* include the script */
include("files.lib.php");
//set the destination folder
$c['dir']="upload/dl";
// set the allowed mime types
$c['types']=array("application/msword", "application/excel", "application/vnd.ms-excel", "application/x-excel", "application/x-msexcel", "application/rtf", "application/x-rtf", "text/richtext");
// initialize the class in an object
$files = new files($c);
// return the upload form
echo $files->display_upload();
//return the list of files
echo $files->display();
?>