我试图使用SmartyView与我的Cakephp设置。我在这里使用了这个类:http://bakery.cakephp.org/articles/icedcheese/2008/01/14/smarty-view-for-1-2
但是在执行时,我得到这个错误:
通知(8):间接修改重载属性SmartyView::$Smarty无效[APP/views/Smarty .php,第58行]
致命错误:不能通过引用赋值给重载对象
对于这一行:父::__construct(控制器)美元;$this->Smarty = &new Smarty();
还有其他人遇到这个/知道该怎么做吗?谢谢!
你不能通过引用传递参数给魔法方法。
改变:
$this->Smarty = &new Smarty();
:
$this->Smarty = new Smarty();