PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of nirmalsinghkps   Image upload, restrict, display   test.php   Download  
File: test.php
Role: Example script
Content type: text/plain
Description: Its used to upload,restrict,display an image by ease
Class: Image upload, restrict, display
Process and display uploaded image files
Author: By
Last change: Justa update
Date: 14 years ago
Size: 482 bytes
 

Contents

Class file image Download
<?
require_once("img_function.php");
$obj=new image_v1();
?>
<?

if(isset($_REQUEST['submit']))
{
   
$file_display=$obj->upload('file_name','folder1');
    if(
$file_display[1] == 1)
        echo
$obj->display($file_display[0], "folder1", $file_display[1]);
    else
        echo
$file_display;
}

?>
<form action="test.php" name="form" method="post" enctype="multipart/form-data">
<input type="file" name="file_name"/>
<input type="submit" name="submit" value="upload" >
</form>