Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ljubo Bumbarov  >  Image Resizer  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example
Class: Image Resizer
Change the size of uploaded image files
Author: By
Last change:
Date: 2007-06-19 09:13
Size: 671 bytes
 

Contents

Class file image Download
<?php
if (isset ($_POST["submit"])) {

include (
"imageresizer.class.php");
        
            
$image = new Image($_FILES['file']['name']);        
            
$image -> PicDir "uploads/";
            
$image -> TmpName      $_FILES['file']['tmp_name'];
            
$image -> FileSize   $_FILES['file']['size'];
            
$image -> FileType   $_FILES['file']['type'];
        
        
//$image -> Save(); //use this if you wish images without resizing
        
$image -> Resize ();        
    } else {
    
?>
<form name="form" action="<?php echo $_SERVER['PHP_SELF']; ?>" method=post enctype="multipart/form-data">
<input type="file" name="file"  size="40">
<input type="submit" name="submit" value="submit">
</form>
<?php
    
}
?>