Примеры в отдельную папку

This commit is contained in:
Федор Подлеснов 2015-12-11 12:14:30 +03:00
parent 0f62ba3a29
commit 313413931b
7 changed files with 6 additions and 6 deletions

19
examples/example.php Normal file
View file

@ -0,0 +1,19 @@
<?php
require_once '../klein.php';
function title($x) {
return ucfirst($x);
}
$tpl = new Klein();
$tpl->compile('tempalte.html');
echo $tpl->render(array(
'pagename' => 'awesome people',
'authors' => [['name' => 'Paul', 'age' => 10], ['name' => 'Jim', 'age' => 11], ['name' => 'Jane', 'age' => 12]],
'city'=> [
'Yaroslaval' => 1,
'Moscow' => 2
]
));