PHP code example of lsys / cookie
1. Go to this page and download the library: Download lsys/cookie library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lsys / cookie example snippets
//设置$salt,用来加密cookie用,一般初始化时设置
//如果不设置$salt,COOKIE 加密不被启用
Cookie::$salt='your salt';
//设置COOKIE
Cookie::set("tt","bbcccc");
//得到cookie
echo Cookie::get("tt");