注意(8):未定义的属性:View :: $ Cookie [CORE / Cake / View / View.php,第804行]
我在AppController中使用if ($this->Cookie->read('userId') != null)
,它给出了上面的错误。为什么呢?
答案 0 :(得分:0)
您可能需要将其添加到控制器:
var $components = array('Cookie');
答案 1 :(得分:0)
这是因为您在CTP文件中使用Cookie组件