PHP Classes

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of hasan movahed  >  Simple Upload File Safely  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: demo class
Class: Simple Upload File Safely
Validate and process uploaded files
Author: By
Last change:
Date: 2 years ago
Size: 791 bytes


Class file image Download
require 'class-upload.php';

define('BASE_PATH', dirname(__file__) . '/');
define('UP_PATH' , BASE_PATH.'upload/' );

$up=new upload( array( 'image/jpeg' => 30000000 , 'image/gif' => 800000 , 'image/png' => 400000 ) , UP_PATH ) ;

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class to upload files safely -</title>
<h1>i love php - develop by hasan movahed from iran</h1>
<form enctype="multipart/form-data" action="index.php" method="POST">
<input name="file" type="file" /> <br />
<input type="submit" value="Upload File" />