laiz / laiz-template
Simple template engine
Installs: 65
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/laiz/laiz-template
Requires
- php: >=5.3.3
Requires (Dev)
- phpunit/phpunit: 3.7.*
- piece/stagehand-testrunner: 3.5.0
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