ternstyle - Lehigh Valley, Allentown, Bethlehem, Easton, WordPress, Lehigh Valley web design, web programming, web development, lehigh valley web hosting, content management tools, website plugins, WordPress plugins, WordPress Themes, php libraries, php classes, javascript libraries, javascript classes, jQuery plugins, web programming, free web software, free php classes, free software

File PHP Class

This class is designed to perform very simple actions on files on or uploaded to your server.

Download

Download File PHP Class

2.0

4 KB

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

Home > Products > PHP classes > File PHP Class

Copyright © 2010 Ternstyle Inc. All rights reserved.
site design: ternstyle.us