Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Question about Cookie::set()
I have a question about Cookie class.
If we have set cookie like following.
Cookie::set('test','abcdef',60 * 60 * 24);
After that, we change the value of cookie like following.
Then, expiration would be changed?
Or, the same expiration?
Cookie::set() sets a new cookie, it doesnt check nor care if a cookie with that same name already exists.
So if you call set() without specifying an expiry, it will use the configured cookie.expiration value in your apps config.php. If not configured, the default is 0 (expire at end of session).
It is equivalent to calling the php function setcookie().
Thanks for your clear explanation.
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion