Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Andrey Yasinetskiy  >  File upload class  >  test.php  >  Download  
File: test.php
Role: Example script
Content type: text/plain
Description: Example of class using
Class: File upload class
Handle files uploaded via Web forms
Author: By
Last change:
Date: 10 years ago
Size: 801 bytes
 

Contents

Class file image Download
<?php
include('Upload.class.php');

$upload = new Upload;

if (!empty(
$_POST['action']) && $_POST['action'] == 'upload') {
    
$upload->uploadFile('/files/''md5'10);
    
?>
    <script>
        setTimeout('document.location="test.php"',1000);
    </script>
    <?php

    print_r
($upload->_files);
}

//$upload->imgResize('filename', '/files/', 800, true);
//$upload->deleteFile('filename', '/files/');

?>
<form action="<?=$_SERVER['PHP_SELF']?>" method="POST" name="upload" ENCTYPE="multipart/form-data">
<input type="file" name="file1"><br>
<input type="file" name="file2"><br>
<input type="file" name="file3"><br>
<input type="file" name="file4"><br>
<input type="file" name="file5"><br>
<input type="submit" value="Забросить">
<input type="hidden" name="action" value="upload">
</form>