Login   Register  
PHP Classes
elePHPant
Icontem

Safe Upload: Process files uploaded via Web forms

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (4)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2009-05-25 (5 years ago) RSS 2.0 feedStarStarStar 52%Total: 1,283 This week: 1All time: 2,789 This week: 1,319Up
Version License PHP version Categories  
safe_upload 1.0GNU General Public Lice...3.0Files and Folders
Description Author  

This class can be used to process files uploaded via Web forms.

It checks a given uploaded file and performs several checks before processing it like: checking the file name against a black list of banned names, check if the file already exists in a target directory, check whether the file size is not zero nor exceeds and given limit, check the MIME type against a list of accepted types, check the file name extension against a list of accepted extensions.

Then the class processes the file by moving it to a target directory. If it succeeds, the class returns an array with several details about the file.

Picture of Ahmed Selim [ Mr.Ajax ]
Name: Ahmed Selim [ Mr.Ajax ] <contact>
Classes: 2 packages by
Country: Egypt Egypt
Age: 25
All time rank: 11778 in Egypt Egypt
Week rank: 732 Up10 in Egypt Egypt Down

  Files folder image Files  
File Role Description
Plain text file upload.class.php Class Safe Upload class source file
Accessible without login Plain text file Docs Doc. Documentation of Safe upload
Accessible without login Plain text file example.php Example Example of usinf safe upload

 Version Control Unique User Downloads Download Rankings  
 0%Total:1,283All time:2,789
 This week:1This week:1,319Up
User Ratings User Comments (3)  
 All time
Utility:70%StarStarStarStar
Consistency:60%StarStarStarStar
Documentation:50%StarStarStar
Examples:65%StarStarStarStar
Tests:-
Videos:-
Overall:52%StarStarStar
Rank:1459