Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tom Schaefer  >  Script Progress  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: a very simple sample
Class: Script Progress
Flush page output to show progress of server task
Author: By
Last change:
Date: 2012-03-04 05:32
Size: 325 bytes
 

Contents

Class file image Download
<?php

include_once 'class.php';

$buff = new ScriptProgress();
do {
  
// iterate each 0.15 sec and print an indicator char until max. iter.
  
if ($buff->getIteration() < $buff->getMax()) {
    
$buff->next();
  } else {
    echo 
sprintf("<pre>%s</pre>"print_r($_SERVERtrue));
    break;
  }
} while (
true);