Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Marko Schulz  >  Tmpl  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: This is only an example PHP file.
Class: Tmpl
Template engine that replaces placeholders
Author: By
Last change:
Date: 2009-02-09 14:16
Size: 379 bytes
 

Contents

Class file image Download
<?php

include_once( 'tmpl.class.php' );

// Create Tmpl Object.
(object) $tpl = new Tmpl( array( 'file' => 'example.tpl' ) );

// Parse and print out the template.
$tpl->replace'[%TITLE%]''My Site' );
$tpl->replace'[%BGCOLOR%]''#f5f5f5' );
$tpl->replace'[%COLOR%]''#003366' );
$tpl->replace'[%FONT%]''Verdana, Helvetica, Sans-Serif' );
echo 
$tpl->output();


?>