Login   Register  
PHP Classes
elePHPant
Icontem

File: file_upload.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Adomas Rimeika  >  File Uploading with Description  >  file_upload.php  >  Download  
File: file_upload.php
Role: Example script
Content type: text/plain
Description: samle files adding
Class: File Uploading with Description
Manage file uploading forms with description texts
Author: By
Last change:
Date: 10 years ago
Size: 749 bytes
 

Contents

Class file image Download
<?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;
    }   
}

?>