PHP Classes

File: example/index.php

Recommend this page to a friend!
  Classes of Muhammad Umer Farooq  >  PHP File Manipulation Class  >  example/index.php  >  Download  
File: example/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP File Manipulation Class
Manipulate files and directories in several ways
Author: By
Last change: Apply fixes from StyleCI
Date: 3 years ago
Size: 969 bytes


Class file image Download

use Lablnet\Files;


$files = new Files();

//Write on file
$files->open('test.txt', 'writeOnly')->write('I am test files');

// read the file
var_dump($files->open('test.txt', 'readOnly')->read('test.txt'));

//delete the file

//Make dir

//Change premission
$files->permission('test.txt', 0774);

//Delete files

//Copy files
$files->copyFiles('/name', 'dir/', ['test.txt']);

//Move files
$files->moveFiles('/', 'dir/', ['test.txt']);

//Delete dirs

//Copy dirs
$files->copyDirs('/', 'dir/', ['test.txt']);

//Move dirs
$files->moveDirs('/', 'dir/', ['test.txt']);

//File upload
$status = $files->fileUpload($_FILES['file'], '/', 'image');

//Multiple file upload
$status = $files->filesUpload($_FILES['file'], '/', 'image', count($_FILES['file']['name']));

For more information send a message to info at phpclasses dot org.