10){ array_shift($log); //数组开头一个移除 } $str = serialize($log); //数组转化为字符串 setcookie('his',$str);}else{ setcookie('his',$url );}$log = unserialize($_COOKIE['his']); //cookie字符串转化为数组echo count($log).'';foreach($log as $v){ echo $v.'';}
本文共 309 字,大约阅读时间需要 1 分钟。
10){ array_shift($log); //数组开头一个移除 } $str = serialize($log); //数组转化为字符串 setcookie('his',$str);}else{ setcookie('his',$url );}$log = unserialize($_COOKIE['his']); //cookie字符串转化为数组echo count($log).'';foreach($log as $v){ echo $v.'';}
转载于:https://www.cnblogs.com/zzg521/p/4939912.html