无法初始化Twig

时间:2013-12-30 20:02:44

标签: php twig

我在我的localhost上尝试过Twig并且一切正常,但是在迁移到VDS后它无法正常工作

echo 'step 1!<br>';
require_once "/var/www/Libs/Twig/lib/Twig/Autoloader.php";
echo 'step 2!<br>';
Twig_Autoloader::register();
echo 'step 3!<br>';
$loader = new Twig_Loader_Filesystem( "/var/www/Templates" );
echo 'step 4!<br>';
$twig = new Twig_Environment($loader,  array(
'cache' => "/var/www/Cache", 'auto_reload' => true, 'debug' => true));
echo 'step 5!<br>';
$twig->loadTemplate('page.tpl');
echo 'step 6!<br>';
echo $template->render();
echo $twig->render($template, array('the' => 'variables'));
echo 'step 7!<br>';

仅输出步骤1 ..步骤5.不显示PHP错误(E_ALL)

0 个答案:

没有答案