PHP Classes

Safely Upload: Validate and process uploaded files

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 479 All time: 5,945 This week: 263Up
Version License PHP version Categories
safely-upload 1.0MIT/X Consortium ...4.0HTTP, PHP 5, Files and Folders


This class can be used to validate and process uploaded files.

It can take array of data for a given uploaded file and can check it to verify whether it does not exceed the maximum allowed size, check whether it has one of the allowed file name extensions, check whether the destination directory exists and is writable before copying it.

The class can also create the thumbnails if the uploaded file is an image.

Picture of Abdelkader Elkalidi
Name: Abdelkader Elkalidi <contact>
Classes: 2 packages by
Country: Morocco Morocco
Age: ???
All time rank: 24436 in Morocco Morocco
Week rank: 550 Up5 in Morocco Morocco Up

  Files folder image Files  
File Role Description
Files folder imageuploads (1 file)
Accessible without login Plain text file form.html Example From example
Plain text file SafelyUpload.php Class SafelyUpload class
Accessible without login Plain text file upload.php Example Code exemple

  Files folder image Files  /  uploads  
File Role Description
  Accessible without login Plain text file index.html Output none

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:5,945
This week:263Up