PHP Classes

File: multiupload.htm

Recommend this page to a friend!
  Classes of Aderbal Nunes   Upload Operations   multiupload.htm   Download  
File: multiupload.htm
Role: Example script
Content type: text/plain
Description: Example from multiupload
Class: Upload Operations
Validate and process files uploaded via Web forms
Author: By
Last change:
Date: 18 years ago
Size: 843 bytes
 

Contents

Class file image Download
<?php
// class
require("classes/UploadOperations.inc.php");
// new Object
$multup = new UploadOperations;

?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<!-- FORM 5 FILES -->
<form name="multiupload" enctype="multipart/form-data" method="post" action="">
  <input type="file" name="file[]" /><br />
  <input type="file" name="file[]" /><br />
  <input type="file" name="file[]" /><br />
  <input type="file" name="file[]" /><br />
  <input type="file" name="file[]" />
  <input name="postok" type="submit" id="postok" value="Vai" />
</form>
<?php
if(isset($_POST['postok'])) {
   
// receptor
   
$foto = $_FILES['file'];
   
// metodo (file, maxsize, uploadir)
   
$multup->MultiUpload($foto, 50000, "uploadir");
}
?>
</body>
</html>