PHP Classes

File: Docs

Recommend this page to a friend!
  Classes of Ahmed Selim [ Mr.Ajax ]  >  Safe Upload  >  Docs  >  Download  
File: Docs
Role: Documentation
Content type: text/plain
Description: Documentation of Safe upload
Class: Safe Upload
Process files uploaded via Web forms
Author: By
Last change: Decoration
Date: 8 years ago
Size: 1,305 bytes


Class file image Download
/** ********************************************************************
Written by : Ahmed Selim Refaat (Mr.Ajax)
TODO : Uploading files in easy steps

Instructions : 
	$upload = new file_upload("upl");
		##>Used to define the $_FILES name parameter (if form upload box named "upl" so uploading process var. will be $_FILES[upl] and here in class will named "upl" only).
	$upload->file_prefix = "pict";
		##>Put prefix before file name.
	$upload->safe_name = TRUE;
		##>change any spaces to "_" ,initially true.
		##>Specify maximum file size.
		##>dirname of being uploaded to
		##>Specify file name without random generation or using prefix
		##>Specify it to true to make class to generate random file name
		##>Specify allowed mime types to be uploaded
		##>Black list extensions that forbidden to be uploaded	
	echo $upload->upload_process();
		##>perform final uploading process.
After uploading process it return array contining these information 
	[0]File Name
	[1]Dir Name
	[2]File Size
	[3]File Type
	[5]Original Name
	[6]File Path