Location: PHPKode > scripts > Advanced file upload and ajax upload > advanced-file-upload-and-ajax-upload/one_file/ReportFile.php
<?php 

require_once ('../stnc_upload_class_v4.php');
 if ($_FILES) {
    
        echo '<div id="reports">';
        

$extension_types = array('zip','pdf');
$Uploader = & new stnc_file_upload();
$Uploader->language = '../stnc_upload_class_lang/english.php';
$Uploader->picture_uploads (true, 'MB', '1');
$Uploader->file_upload( 'MB', '3');
$Uploader->  name_format (true,'ReportFile','','');//warning 
$Uploader->uploader_set($_FILES['file'], 'uploads', $extension_types,true);
$Uploader -> result_report();  
 if ($Uploader->uploaded) //upload info // true or false    
 echo '<br>successful'; 
        echo '</div>';
        
    }
    
?>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9">
 </head>
 <form method="post" id="file_upload_form" action="" enctype="multipart/form-data" content="text/html; charset=utf-8">
            <table width="419" height="29" border="0">
                <tr>
                    <th colspan="2" scope="col" >
                     Report File add
                    </th>
                </tr>
           
              

                <tr >
                    <td width="96">
                      Report File
                    </td>
                    <td width="447">
                        <input type="file" id="ReportFile" size="%50" name="file[]" />
                    </td>
              
                </tr>
        
            </table>
			<input class="submit" type="submit" name="submit" value="Save">
</form>
</body></html>
Return current item: Advanced file upload and ajax upload