Cookie::init(); // Very important.
Cookie::set('myvar1', 'myval'); // Set a cookie permanently
Cookie::set('myvar2', 'myval', false); // Set a cookie for current session
Cookie::set('myvar3', 'myval', '+1 day'); // Set a cookie for one day
Cookie:get('myvar1'); // Get value of cookie 'myvar1'
Cookie:get('myvar100'); // NULL
Cookie::clear('myvar2'); // Clear cookie 'myvar2'
Cookie::set('myvar2', null); // Also clears
Cookie::set('myvar3', 'val', -1000); // Also clears
forked from behigh/Cookie
-
Notifications
You must be signed in to change notification settings - Fork 0
chenyongze/Cookie
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A PHP Cookies Wrapper
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- PHP 100.0%