PHP Classes

File: download_progress.ajax.php

Recommend this page to a friend!
  Classes of Pierre-Henry Soria   PHP 5.4 Session Upload Progress Bar   download_progress.ajax.php   Download  
File: download_progress.ajax.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 download_progress.ajax.php
Date: 3 months ago
Size: 574 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';

$sParameter = (!empty($_POST['param'])) ? strip_tags($_POST['param']) : '';
$oUpload = new Upload;

switch(
$sParameter)
{
    case
'progress':
        echo
$oUpload->progress();
    break;

    case
'cancel':
       
$oUpload->cancel();
    break;
}