在我的cakephp应用程序中,我之后只使用了路由,在该路由页面中,cakephp会话无效...
这是我的代码:
Router::connect('/', array('controller' => 'Organizations', 'action' => 'view', 'orgname' => $orgname));
Then in the Organizations/view, the cakephp session is not working...
我该如何解决这个问题?
答案 0 :(得分:0)
我只是将以下代码放入路由控制器的操作中。
App::uses('CakeSession', 'Model/Datasource');
$value_user_id = CakeSession::read('LoggedSessionUserId');
然后我成功获得了会话值...