我正在使用
public function beforeFilter() {
parent::beforeFilter();
//$this->Cookie->name='cookie_test';
//$this->Cookie->time=3600;
//$this->Cookie->path='';
//$this->Cookie->domain='';
//$this->Cookie->secure=false;
//$this->Cookie->key='39lbkutg1i2l0kta6785d8qki5';
//$this->Cookie->httpOnly=true; >
}
用于设置cookie,但当我尝试阅读时,它会以加密形式出现。
答案 0 :(得分:0)
当你设置你的Cookie时。什么你写它应该给你读取的价值。
e.g。如果你写
$this->Cookie->write('name', 'Larry');
当你通过
阅读时$this->Cookie->read('name');
它给了你"拉里"