PHP Classes
Icontem

File: index5.php


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Johan Barbier  >  No Timeout  >  index5.php  
File: index5.php
Role: Example script
Content type: text/plain
Description: example
Class: No Timeout
Split the execution of long tasks in small steps
 

Contents

Class file image Download
<?php
set_time_limit 
(5);
$sFile 'texte.txt';
$iSize filesize ($sFile);
/**
* basic test reading a file using a pattern step
* pattern step is </test> element in the xml file
* can be used to read any type of file.
*/
?>
<?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">
        var sString = ' | ';
        oBuffer = new noTimeOut ();
        oBuffer.declareStack ('FILE');
        oBuffer.initialize ('FILE', 'START', 0);
        oBuffer.initialize ('FILE', 'LIMIT', <?php echo $iSize?>);
        oBuffer.initialize ('FILE', 'STEP', 10);
        oBuffer.initialize ('FILE', 'SUBSTR', sString.length);
        oBuffer.initialize ('FILE', 'FILE', '../<?php echo $sFile?>');
        oBuffer.initialize ('FILE', 'TARGET', 'divContent');
        oBuffer.initialize ('FILE', 'MSG', 'msg');
        oBuffer.initialize ('FILE', 'SCRIPT', 'scripts/fileFetchLine.php');
        oBuffer.initialize ('FILE', 'TYPE', 'FILE_LINE');

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

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products