cakephp does not save cookie -


i have simple code in appcontroller beforefilter function, set cookie

$this->cookie->name = 'mycookie'; $this->cookie->time =  '1 hour'; $this->cookie->domain = 'example.com';  $mycookie = $this->cookie->read('my_cookie');  if ( empty($mycookie) ) {     $this->cookie->write('my_cookie', 'cookievalue', true); } else {     echo $mycookie;die; }        

so, refresh page second time should echo cookie's value. not. output nothing. ideas can problem ?

i use cake 2.3.1. cookie component included. debug level 3 , there no errors. have checked cake logs file - nothing there.

thanks


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -