x
 
<!DOCTYPE html>
<?php
setcookie("test_cookie", "test", time() + 3600, '/');
?>
<html>
<body>
<?php
if(count($_COOKIE) > 0) {
     echo "Cookies 已启用。";
} else {
     echo "Cookies 已禁用。";
}
?>
</body>
</html>