PHP Classes

File: examples/example1.php

Recommend this page to a friend!
  Classes of amir hoseinian  >  Image Saver  >  examples/example1.php  >  Download  
File: examples/example1.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Image Saver
Resize an image keeping the size proportions
Author: By
Last change: Update of examples/example1.php
Date: 11 months ago
Size: 815 bytes


Class file image Download
require_once '../ImageSaver.php';
define('APPLICATION_PATH', __DIR__);

$imageSaver = new ImageSaver();
$imageSaver->allowFileTypes = array("jpg","jpeg"); //defining allowed file types


    <title>image file post example</title>
    <form method="post" action="" enctype="multipart/form-data">
        Accepted file types is
        ( <?php foreach($imageSaver->allowFileTypes as $type) echo $type." ";?>)
        u can add other types in $imageSaver->allowFileTypes property
            <lable>image file:<input name="image" type="file"></lable>
        <div><input type="submit"></div>
    <img src="images/test.jpg" alt="">

For more information send a message to info at phpclasses dot org.