2010-11-23 5 views
2

컨트롤러에 $this->autoRender = false; 코드가 있으면 세션에서 쓸 수 없습니다.cakephp : 세션을 쓸 수 없습니다.

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

가 어떻게 세션이 작성되지 않았습니다 알고 있습니까? – Young

답변

1

CakePHP 1.3을 사용하는 경우 세션 도우미를 활성화했지만 세션 구성 요소는 활성화하지 않았을 가능성이 큽니다. Check the manual here. 당신은 아마 당신의 AppController에,이 두 가지가 필요합니다

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

또는 PHP4 :

var $components = array('Session'); 
var $helpers = array('Session'); 
관련 문제