close
<?php
$cookie_name = "user";
$cookie_value = "John";
setrawcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/");
// 86400 = 1 day
?>
<html>
<body>
<?php
echo "Cookie is set.";
?>
</body>
</html>
?>
輸出:Cookie is set.
全站熱搜
留言列表