Try using :
function beforeFilter() {
$this->Cookie->time = '5 Days';
$this->Cookie->path = '/';
}
On 9/20/08, Kenchu <[EMAIL PROTECTED]> wrote:
>
>
> I've managed to get cookies working for the session, but if I restart
> my browser, the cookies seem to be gone, and $cookieTime doesn't seem
> to do anything about it. This is the code I've got:
>
> _______________________________________________
>
> [...]
>
> var $cookieName = 'my.cookie';
> var $cookieTime = 3600;
> var $cookieKey = '***************************';
>
> function index() {
> // $this->Cookie->write('cart', array(124,1232,3232));
> pr($this->Cookie->read('cart'));
> }
>
> [...]
>
> _______________________________________________
>
> So what I do is uncomment the cookie-write-line, run the script, then
> comment the line again, and then run the script once more. Now if you
> DONT turn off the browser, you will see the array being printed.
> However, if I restart the page and visit it again, nothing will be
> printed.
>
> Help plz. :D
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---