PHP Classes

File: example

Recommend this page to a friend!
  Classes of Slavomir Mikolaj   Simple PHP Upload   example   Download  
File: example
Role: Example script
Content type: text/plain
Description: example of using
Class: Simple PHP Upload
Validate and process uploaded files
Author: By
Last change: woot
Date: 13 years ago
Size: 761 bytes
 

Contents

Class file image Download
<?php
 
  
include_once('php_upload.php');
  
  
  
$upload = new PhpUpload;
  
$upload->FullDisplay(true); // << To Display Full Form
  
$upload->SetUploadDir('./'); // << Set Upload directory
  
$upload->ReturnBool(false); // << Class returns only true, false
  
  
$upload->SetExts('jpg|gif|ini');
  
//$upload->NewName('subor.jpg'); // Set new filename
  
   //$upload->ReturnOutput(true); << Return Output
  
$upload->SetMaxSize(2000); // << Max File Size in KB
  
$upload->SetErrorTypes('Obmedzuje php.ini', 'Nastala chyba!', 'Zly format!', 'Subor nesmie byt vecsi ako $ kB'); // << Client error types
    
  
$upload->ShowUpload('PhpUpload1');
  
  
$upload->TryUpload(); // << If isset try upload file
  
 
 
?>