我主要使用的是 CakePHP 2.4.2 和这个插件。
我想在 CakePHP 中使用 TwigView,发现上面的插件与 CakePHP 2.0 兼容。但是,按照所有安装步骤操作,在执行脚本时出现Missing View错误。
我的 AppController.php
<?php
App::uses('Controller', 'Controller');
class AppController extends Controller {
public $viewClass = 'TwigView.Twig';
}
视图的扩展名是.tpl,但是,即使在添加插件之后,它仍在寻找.ctp扩展名。
我还使用在 bootstrap.php 中加载了插件
CakePlugin::load('TwigView');
define('TWIG_VIEW_CACHE', APP . 'tmp');
任何想法可能会出错。