PHP Classes


Recommend this page to a friend!
  Classes of M.G.Ranga Pathmasiri  >  File Uploading Web interface  >  >  Download  
Role: Configuration script
Content type: text/plain
Description: This is file for setting user information
Class: File Uploading Web interface
Simple file uploading form handling
Author: By
Last change:
Date: 13 years ago
Size: 1,408 bytes


Class file image Download
//Design by : M.G.Ranga Pathmasiri
//Author Email :
//Class Name : upload_file in Graphically mode
//Tested : win 2000 , XP, IIS, IE, Mozilla
//version : 1.0;

//Define storage capcity
define ("CAPACITY", "2MB", true); // defines the filesize of the file you allow the user to upload

//define upload directery
define("DIR_NAME", "../upload", true); // defines the directory the files will be uploaded to

//define username folder
define("DEFAULT_USER_NAME", "/asela"); // the user name should be defined here

//Define submit page
$page = $_SERVER['PHP_SELF'];

//Define page variable
$html = "" ;
$total = 0 ;
$total_value = 0;
$pvalue = 0;
$inough = false;
$name = "";
$file_count = 0;
$error = false;
// this is place for set display error

$error_array =array('fileerror' => "Please select file to upload",
'uploadferr' => "File Upload error",
'notfile' => "First select files to upload",
'alsohave' => "This file has already been uploaded.",
'default' => "Server Error"