PHP Classes

File: ftc_test.php

Recommend this page to a friend!
  Classes of Cornel Alexa  >  ft  >  ftc_test.php  >  Download  
File: ftc_test.php
Role: Example script
Content type: text/plain
Description: Test/Sample file for ft_cache class.
Class: ft
Template engine with nested dynamic blocks
Author: By
Last change:
Date: 14 years ago
Size: 1,151 bytes


Class file image Download
//call this page with different parameters
//like ftc_test.php?t=1 or t=2,etc.. to see how context
//work.You will see the cache files in the cache folder.
//If they don't show up,then change the max_runtime to
//something like 0.0002
//See the class file for more info...

$ft=new ft_cache(".",".");
//play with this and the for loop value
//but don't forget to clear already cached files
//or change the timestamp (touch()) of file
//from your cache folder.
$ft->max_runtime=1; //one seccond
$ft->define(array('main' => 'a_static.html','row' => 'b_static.html'));
//check if a cache was found.If so the
//hang the script here.Also instead of ft_print() we can get
//the cache content in a var and do other actions on it...
"Page served from cache.<br>";
//from here on is normal template use.
$ft->assign("HEADER",'Cached Test');