PHP Classes

File: sample_2.php

Recommend this page to a friend!
  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: 18 years ago
Size: 520 bytes


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' => '');
$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);