【php开源代码栏目提醒】:网学会员鉴于大家对php开源代码十分关注,论文会员在此为大家搜集整理了“headcookie.php”一文,供大家参考学习
<?php
if (!empty($_cookie['tracker']))
$tracker=++$_cookie['tracker'];
else
$tracker=1;
//设置失效时间
$expires_soon=date("1,d-m-y h:i:s",time()+54000);
//发送header
header("set-cookie: tracker=$tracker;expires=$expires_soon;");
?>
<html>
<head>
<title>header传送cookie</title>
</head>
</body>
<?php
echo "你已经访问本页 $tracker 次了!";
?>
</body>
</html>
上一篇:
headcook.php
下一篇:
阴道松弛练紧三法