PHP Classes

File: upload.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Antonello Mangone  >  File-Uploader  >  upload.php  >  Download  
File: upload.php
Role: Example script
Content type: text/plain
Description: example use
Class: File-Uploader
Validate and process uploaded files with forms
Author: By
Last change:
Date: 4 years ago
Size: 1,168 bytes


Class file image Download
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
    <title>.:: file upload by settings ::.</title>
    <link rel="stylesheet" type="text/css" href="style.css" />
    <form enctype="multipart/form-data" method="post">
    <table align="center" width="500">
        <tr><td align="center" class="hf">.:: file upload by settings ::.</td></tr>
        <tr><td align="left" class="formUp">
        <li><b>maximum size:</b> 100 kb</li>
        <li><b>extensions admitted:</b> .gif .jpg .jpeg .png</li>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="file" name="upload" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="send" value="Upload" class="bottone"/>
        <tr><td align="center" class="hf">&copy; <a href="">Antonello Mangone</a></td></tr>
if ($_POST["send"] == "Upload") {
$extensions = array("image/gif", "image/jpg", "image/jpeg", "image/png");
$upload = new fileUploader("images/","100000",$extensions,$_FILES['upload']);