Hi to all I have this strange error in my code. I want to make a cookie system with cakephp开发者_运维问答, and in app_controller.php I include
var $components = array('Auth', 'Cookie'); var $helpers = array('Html', 'Form', 'Session');
but everytime I click on Logout link the error appears. This is the function
function logout() { $cookie = $this->Cookie->read('User'); if($cookie) $this->Cookie->del('User'); $this->Session->setFlash('Logout'); $this->redirect($this->Auth->logout()); }
Where I can look for a solution? Thank you dude
The method name is delete
, not del
, hence the error. See also http://api.cakephp.org/class/cookie-component#method-CookieComponentdelete
精彩评论