已采纳回答 / 一二三123
模板继承的文件是在你newTwig_loader_Filesystem(VIEW_PATH);里面的参数当做目录在根目录下寻找,也是就说你这个目录应该设定成views为根目录,然后载入控制器的html文件,
$loader = new \Twig_Loader_File...
2018-05-15
我的项目源码:
链接:https://pan.baidu.com/s/1lHd8euq0URr6-HlEWk9NwA 密码:p48c
链接:https://pan.baidu.com/s/1lHd8euq0URr6-HlEWk9NwA 密码:p48c
2018-05-10
我的项目源码:
链接:https://pan.baidu.com/s/1lHd8euq0URr6-HlEWk9NwA 密码:p48c
链接:https://pan.baidu.com/s/1lHd8euq0URr6-HlEWk9NwA 密码:p48c
2018-05-10
$loader = new \Twig_Loader_Filesystem(APP.'/views');
$twig = new \Twig_Environment($loader, array(
'cache' =>IMOOC.'/log/twig',
'debug'=>DEBUG
));
$template=$twig->loadTemplate($file);
$template->display($this->assign?$this->assign:'');
$twig = new \Twig_Environment($loader, array(
'cache' =>IMOOC.'/log/twig',
'debug'=>DEBUG
));
$template=$twig->loadTemplate($file);
$template->display($this->assign?$this->assign:'');
2018-05-10