开发者

cakephp : session can't write

If the开发者_如何学运维 Controller have the code $this->autoRender = false; the session can't write.

function login() {
      $this->autoRender = false;
      $this->Session->write('Student', 'test');
}


If you're using CakePHP 1.3, You most likely have activated your Session Helper, but not your Session Component. Check the manual here. You'll need both of these, probably in your AppController:

public $components = array('Session');
public $helpers = array('Session');

or PHP4:

var $components = array('Session');
var $helpers = array('Session');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜