第一:设置
代码语言:javascript复制<?php
header('Content-Type:text/html;charset=utf-8');
setcookie("menber[name]","陈业贵",time() 2000);
2.获取
代码语言:javascript复制<?php
header('Content-Type:text/html;charset=utf-8');
var_dump($_COOKIE['menber']['name']);
删除cookie
代码语言:javascript复制<?php
header('Content-Type:text/html;charset=utf-8');
setcookie("member[name]",'陈业贵',time()-1);
var_dump($_COOKIE['member']['name']);