PHP Classes

File: upload.php

Recommend this page to a friend!
  Classes of Pierre-Henry Soria   PHP 5.4 Session Upload Progress Bar   upload.php   Download  
File: upload.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP 5.4 Session Upload Progress Bar
Track the progress of file uploads using sessions
Author: By
Last change: Update of upload.php
Date: 1 month ago
Size: 671 bytes
 

Contents

Class file image Download
<?php
/**
 * @category PHP5.4 Progress Bar
 * @author Pierre-Henry Soria <ph7software@gmail.com>
 * @copyright (c) 2012, Pierre-Henry Soria. All Rights Reserved.
 * @license CC-BY License - http://creativecommons.org/licenses/by/3.0/
 * @version 1.0.0
 */

require_once 'Upload.class.php';

/**
 * If the request GET['show_transfer'] is "on", it shows $_FILES and $_SESSION
 * using the var_dump PHP function.
 * Otherwise it sends the image to the server and displays with information about the image.
 */
$sMethod = (!empty($_GET['show_transfer']) && $_GET['show_transfer'] == 'on') ? 'show' : 'addFile';
echo (new
Upload)->$sMethod();