<?php
require ('files_upload.inc');
#seting class;
#images_upload(upload directory, max filesize, files info - filename);
$upload = new images_upload('c:/pphotos/', 100000, 'info.dat');
?>
<a href="files_list.php">files list</a>
<HTML>
<FORM action="" method="post" enctype="multipart/form-data">
<INPUT type="file" name="up_file">
<INPUT type="text" name="up_file_desc"><br>
<INPUT type="submit">
</FORM>
</HTML>
<?
# it's good becouse you dont need to set vars by your self you only set to upload all $_FILES
# file upload you need set fields name for file like 'file' for description 'file1_desc'
$upload->upload();
if (is_array($upload->errors)) {
foreach ($upload->errors as $val){
echo $val;
}
}
?>
|