Login   Register  
PHP Classes
elePHPant
Icontem

File: example_1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Valics Lehel  >  Fast Template  >  example_1.php  >  Download  
File: example_1.php
Role: Example script
Content type: text/plain
Description: example 1
Class: Fast Template
Updated revision of CDI Fast Template engine
Author: By
Last change: small changes
Date: 2006-06-27 23:17
Size: 897 bytes
 

Contents

Class file image Download
<?
// Example FastTemplate Demo #1 - The example from the man page
// $Id: example_1.php,v 1.5 2006/02/14 12:27:33 paul Exp $
Header("Content-type: text/html");


include(
"cls_fast_template.php");
$ft = new FastTemplate("./templates");
$ft->php_in_html(true);
$ft->REWRITE_SRC_PATH="www.google.com/";
$time1=$ft->utime();
$ft->define(
    array(
        
'main'    => "main.html",
        
'table'   => "table.html",
        
'row'     => "row.html"
    
)
);
$ft->assign( array("TITLE"=> "FastTemplate Test") );
for (
$n=1$n <= 3$n++)
{
    
$Number $n;
    
$BigNum $n*10;
    
$ft->assign(
        array(
            
'NUMBER'      =>  $Number,
            
'BIG_NUMBER'  =>  $BigNum
        
)
    );
    
$ft->parse("ROWS",".row");
}
$ft->showDebugInfo(1);
$ft->parse("MAIN", array("table","main"));
print (
$ft->utime()-$time1."\n");
$ft->FastPrint();
exit;
?>