时间:2021-07-01 10:21:17 帮助过:8人阅读
输出WEB开发笔记
function cookie($var, $value='', $time=0, $path='', $domain=''){
$_COOKIE[$var] = $value;
if(is_array($value)){
foreach($value as $k=>$v){
setcookie($var.'['.$k.']', $v, $time, $path, $domain, $s);
}
}else{
setcookie($var, $value, $time, $path, $domain, $s);
}
}
//调用方法
cookie("website","WEB开发笔记","./","www.gxlcms.com");
//
echo $_COOKIE["website"];//