一,设置 Cookie

setcookie("user",$user,time()+3600);     // user 为用户名,$user 为变量的值


二,读取 Cookie

echo @$_COOKIE["user"];