Login   Register  
PHP Classes
elePHPant
Icontem

File: new.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Diego da Costa Chavao  >  Chavão Template Manager  >  new.php  >  Download  
File: new.php
Role: Example script
Content type: text/plain
Description: Example file
Class: Chavão Template Manager
Template engine that replaces variables
Author: By
Last change: Change language from portuguese to english
Date: 2010-01-24 00:58
Size: 564 bytes
 

Contents

Class file image Download
<?php

include 'CTemplate.php';

$objT = new CTemplate('new.html','templates');
/*
$objT = new CTemplate();
$objT->setPath('templates');
$objT->setTemplate('new.html');
*/

$linha[0] = "Zero";
$linha[1] = "One";
$linha[2] = "Two";
$linha[3] = "Three";

$teste[0] = "1";
$teste[1] = "2";
$teste[2] = "3";
$teste[3] = "4";
$teste[4] = "5";

$objT->assign('title','Test page');
$objT->assign('variavel_teste',"New value to be placed at variavel_teste");
$objT->assign('linha',$linha);
$objT->assign('teste',$teste);
$objT->display();

?>