1. 首页
  2. 数据库
  3. 其它
  4. cookie的优化与购物车实例

cookie的优化与购物车实例

上传者: 2020-12-22 13:10:50上传 PDF文件 53.45KB 热度 5次
一 Cookie 的优化 1.1 一般而言,我们设置cookie是在php中设置 例如: <?php setcookie('testKey1','hello world',0,'/'); //# 当 expires = 0 时,此Cookie随浏览器关闭而失效,?> 而在验证的时候,我们通常是: <?php if(isset($_COOKIE['testKey2'])) echo "The New COOKIE is : testKey2 = ".$_COOKIE['testKey2']; else echo "The new COOKIE is setting
下载地址
用户评论