PHP Classes
elePHPant
Icontem

File: example/index2.php

Recommend this page to a friend!
  Classes of Muhammad Umer Farooq  >  PHP File Manipulation Class  >  example/index2.php  >  Download  
File: example/index2.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: 5 months ago
Size: 753 bytes
 

Contents

Class file image Download
<?php
use Lablnet\Files;

require_once
'../vendor/autoload.php';
$files = new Files();

if (isset(
$_POST['submit'])) {
   
//File Upload
   
$status = $files->filesUpload($_FILES['file'], '/', 'image', count($_FILES['file']['name']));
    foreach (
$status as $key => $value) {
       
var_dump($value);
    }
}
?>
<!DOCTYPE html>
<html>
    <head>
        <title>PHP File Manipulation Class Examples</title>
    </head>
    <body>
        <fieldset>
            <legend>File Upload</legend>
                <form id="fileUp" name="fileUp" action="" method="post" enctype="multipart/form-data">
                        <input type="hidden" name="usage" value="upl" />
                        <input type="file" name="file[]" multiple/>
                        <br>
                        <input type="submit" name="submit">
                </form>
        </fieldset>
    </body>
</html>