Login   Register  
PHP Classes
elePHPant
Icontem

File: tutorial1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Spank Mayer  >  hierarchytemplate  >  tutorial1.php  >  Download  
File: tutorial1.php
Role: Example script
Content type: text/plain
Description: Script Example 1
Class: hierarchytemplate
Template engine that can handle more than one file
Author: By
Last change: to the new versio
Date: 2003-04-27 18:07
Size: 489 bytes
 

Contents

Class file image Download
<?php
    
include_Once("class.template.php");

    
$tpls = new template;
    
//                        "Any name"=> path to tpl file
    
$tpls->tplsAreHere(Array("MAIN"=>"tutorial1.tpl"));

    
// or 2 line in 1
    //$tpls = new template(Array("MAIN"=>"tutorial1.tpl"));

    //Value assig to template variables
    //                           "tpl_var_name"=>value
    
$tpls->t["MAIN"]->Values(Array("UserName"=>"Sweetchack",
                                       
"Time"=>Date("Y.m.d. H:i:s")));

    Print 
$tpls->GetOut("MAIN");
?>