File: tutorial1.php

Recommend this page to a friend!
  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: 17 years ago
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");
?>


For more information send a message to info at phpclasses dot org.