File PHP Class
This class is designed to perform very simple actions on files on or uploaded to your server.
Download Version: 2.0
Sample Code
$file = new fileClass();
if(!$file->isMime('/path/to/file')) {
$file->deleteFile('/path/to/file');
}
The above example will delete a file if it is not of an acceptable file type.
Current Version
The current version of this software is 2.0.
Features
- Read contents of a file as a string
- Determine the magic MIME file type of any file
- Check a file against an array of acceptable file types
- Create arrays of all files in a directory recursively
- Create, rename or delete files
- Move uploaded files
Requirements
- PHP 4.3.0+
- MIME functions are better used with the Fileinfo extension but will function without them.
Documentation
Connect with us
We dig the back-and-forth.