Location: PHPKode > scripts > Simple PHP Upload > example.php
  <?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
   
  
  ?>

Return current item: Simple PHP Upload