PHP Classes

File: test.php5

Recommend this page to a friend!
  Classes of livingdead   XML Cacher   test.php5   Download  
File: test.php5
Role: Example script
Content type: text/plain
Description: little test
Class: XML Cacher
Cache parsed and transformed XML documents
Author: By
Last change:
Date: 19 years ago
Size: 1,052 bytes
 

Contents

Class file image Download
<?
$cachetimeout
=30;
//require("../jpcache/jpcache.php");

//ini_set("include_path",ini_get("include_path").":/mnt/echange/home/test/Cache-1.5.4/");
$start = getmicrotime();
require_once
'xmlCacher.class.php';

$xmlCache = new xmlCacher("/mnt/echange/home/test/cache/xml","/mnt/echange/home/test/cache/out");

$xmlCache->setoutputTimeLimit(30);
$xmlCache->setxmlTimeLimit(30);


//$xmlCache->removeAllCached("test","test.xsl", "testor");
if(!$xmlCache->isCachedXML("test","test.xsl", "testor")) {
   
   
//trigger_error("Et il se retape tout Ha bon ???");
   
   
$xmlData = $xmlCache->setXml(array("FILE"=>"test.xml"));
   
   
}
$stop = getmicrotime();
calculate();
$xmlCache->display("test","test.xsl",$xml,"testor");

function
calculate() {
    global
$start,$stop;
    
$uptime = round(($stop - $start) * 1000000) / 1000;
     echo
nl2br("\n\n\n\tExecution Time: {$uptime} ms\n\t{$cached}\n");
   
flush();
 }
 
 function
getmicrotime() {
    list(
$usec, $sec) = explode(" ",microtime());
    return ((float)
$usec + (float)$sec);
 }


?>