laiz/laiz-template

Simple template engine

v1.2.4 2013-06-26 06:02 UTC

This package is auto-updated.

Last update: 2024-03-23 18:18:44 UTC


README

laiz/template is simple template engine that is developed with PHP5.3.

Usage

Add cache directory in project directory:

cd public_html
mkdir cache
chmod o+w cache

Include Template.php or Parser.php file:

cat > index.php
<?php
require_once 'Laiz/Template/Parser.php';
$t = new Laiz\\Template\\Parser();
$vars = new StdClass();
$vars->foo = 'World!';
$t->show($vars);

Add template file of top page:

mkdir template
echo 'Hello {foo}' > template/index.html