日期:2014-05-17 浏览次数:20628 次
<html>
<body>
<?php
if (isset($_COOKIE["user"]))
{
// Print a cookie
echo $_COOKIE["user"];
// A way to view all cookies
print_r($_COOKIE);
}
else
echo "Welcome guest!<br />";
?>
</body>
</html>
<?php
// set the expiration date to one hour ago
setcookie("user", "", time()-3600);
?>