PHP Classes

Safe Upload: Process files uploaded via Web forms

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (4)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 55%Total: 1,306 All time: 2,948 This week: 263Up
Version License PHP version Categories
safe_upload 1.0GNU General Publi...3.0Files and Folders


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: United States United States
Age: 33
All time rank: 1253180 in United States United States
Week rank: 231 Up20 in United States United States Up

  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  
This week:0
All time:2,948
This week:263Up
User Ratings User Comments (3)
 All time