Login   Register  
PHP Classes
elePHPant
Icontem

File: sample_2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Bao Nguyen Quoc  >  Basic Template  >  sample_2.php  >  Download  
File: sample_2.php
Role: Example script
Content type: text/plain
Description: Example 2
Class: Basic Template
Regular expression matching based template engine
Author: By
Last change:
Date: 2005-04-25 02:04
Size: 520 bytes
 

Contents

Class file image Download
<?

include_once "basic_template.php";

$template = new basic_template;

$template->dir '.';

$article = new stdclass;
$article->headline 'Basic Template Example';
$article->author = array('name' => 'Quoc Bao' 'mail' => 'quocbao.coder@gmail.com');
$article->lite_content 'Basic example (using Array and object variable)';
$article->content "Hello , this is a very easy example<br>\n";

$template->set('article' ,  $article);

$template->output('sample_2.html');

echo 
$template->result;

?>