Login   Register  
PHP Classes

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 1 year 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" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class to upload files safely - wallfa.com</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" />