<?php
header("content-type:text/html;charset=utf-8");
$date=date("Y-m-d H:i:s",time());
if(!empty($_COOKIE['time'])){
echo "你上次登录的时间是:".$_COOKIE['time'];
setcookie('time',$date,time()+3600);
}else{
echo "你是第一次登录";
setcookie("time",$date,time()+3600);
}
?>
header("content-type:text/html;charset=utf-8");
$date=date("Y-m-d H:i:s",time());
if(!empty($_COOKIE['time'])){
echo "你上次登录的时间是:".$_COOKIE['time'];
setcookie('time',$date,time()+3600);
}else{
echo "你是第一次登录";
setcookie("time",$date,time()+3600);
}
?>