Login   Register  
PHP Classes
elePHPant
Icontem

File: examples/subtemplate.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Jin Nguyen  >  Puja  >  examples/subtemplate.php  >  Download  
File: examples/subtemplate.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Puja
Template engine that compiles templates into PHP
Author: By
Last change:
Date: 9 months ago
Size: 362 bytes
 

Contents

Class file image Download
<?php 
ini_set
('display_errors','On');
include 
'../puja.php';
$tpl = new Puja;
$tpl->template_dir 'templates/';
$tpl->cache_dir 'cache/';
$tpl->parse_executer 'eval';
$tpl->headers = array(
    
'tpl_file'=>'subtemplate.tpl',
    
'php_file'=>highlight_file('subtemplate.php',true),
);
$data = array(
    
'username'=>'Puja'
);
$tpl->parse('subtemplate.tpl',$data);
?>