PHP Classes

File: sample.php

Recommend this page to a friend!
  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: 12 years ago
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($_SERVER, true));
    break;
  }
} while (
true);