PHP Classes

File: test.php

Recommend this page to a friend!
  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: 19 years ago
Size: 801 bytes


Class file image Download

$upload = new Upload;

if (!empty(
$_POST['action']) && $_POST['action'] == 'upload') {
$upload->uploadFile('/files/', 'md5', 10);


//$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">