Location: PHPKode > scripts > Advanced file upload and ajax upload > advanced-file-upload-and-ajax-upload/one_file/ReportFile.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">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9">
 <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">
                    <th colspan="2" scope="col" >
                     Report File add

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