Created
June 10, 2011 06:43
-
-
Save siygle/1018338 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'Twig/Autoloader.php'; | |
Twig_Autoloader::register(); | |
$loader = new Twig_Loader_Filesystem('templates'); | |
$config = array( | |
'cache' => 'cache', | |
); | |
$twig = new Twig_Environment($loader, $config); | |
$template = $twig->loadTemplate('index.html.twig'); | |
$data = array('name'=>'Ferrari', 'project'=>'Twig'); | |
echo $template->render($data); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment