PHP Classes

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  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: 8 years ago
Size: 671 bytes


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

include (
$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">