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: 14 years ago
Size: 1,305 bytes
 

Contents

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. $upload->max_file_size ##>Specify maximum file size. $upload->dirname ##>dirname of being uploaded to $upload->filename ##>Specify file name without random generation or using prefix $upload->rename_rand ##>Specify it to true to make class to generate random file name $upload->allowed_mime_types ##>Specify allowed mime types to be uploaded $upload->blacklist_ext ##>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 [4]Extension [5]Original Name [6]File Path ************************************************************************/