PHP Classes

File: index2.php

Recommend this page to a friend!
  Classes of Johan Barbier   No Timeout   index2.php   Download  
File: index2.php
Role: Example script
Content type: text/plain
Description: example
Class: No Timeout
Split the execution of long tasks in small steps
Author: By
Last change: Added multiple asynchronous threads handling via stacks
Date: 17 years ago
Size: 1,186 bytes
 

Contents

Class file image Download
<?php
/**
* basic test reading a DB
* step is 10 lines
*/
set_time_limit (2);
?>
<?xml version
="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script language="Javascript" type="text/javascript" src="class/class.noTimeOut.js"></script>
        <script type="text/javascript">
        oBuffer = new noTimeOut ();
        oBuffer.declareStack ('QUERY');
        oBuffer.initialize ('QUERY', 'START', 0);
        oBuffer.initialize ('QUERY', 'LIMIT', 5000);
        oBuffer.initialize ('QUERY', 'STEP', 10);
        oBuffer.initialize ('QUERY', 'QUERY', 'SELECT t_nom FROM test');
        oBuffer.initialize ('QUERY', 'MSG', 'msg');
        oBuffer.initialize ('QUERY', 'TARGET', 'divContent');
        oBuffer.initialize ('QUERY', 'SCRIPT', 'scripts/dbFetch.php');
        oBuffer.initialize ('QUERY', 'TYPE', 'DB');

        oBuffer.startWork ('QUERY');
        </script>
    </head>
    <body>
        <div id="msg">Waiting</div>
        <div id="divContent" style="width: 500px;"></div>
    </body>
</html>