【发布时间】:2016-05-18 12:00:54
【问题描述】:
我正在研究 cakephp,当点击注销按钮 url 转到其他地址 http://demo4sbc.com.Because 时,视图/用户中没有 logout.ctp,所以任何人都可以告诉我 logout.ctp 页面的编码。
【问题讨论】:
-
请在 usersController 中发布您的 logout() 操作代码
-
你在 UsersController 中创建了注销方法吗?
-
函数注销() { $this->Session->destroy(); $this->redirect($this->Auth->logout()); } 公共函数 google_logout(){ $this->Session->destroy(); $this->Session->delete('Glogin'); header('位置:google.com/accounts/Logout?continue=https://…); $this->redirect($this->Auth->logout()); }
标签: cakephp model-view-controller