mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Changed cookie delete example to assure that the time referred is in the past
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@32714 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
29e018c78c
commit
cd971dcd12
1 changed files with 6 additions and 3 deletions
|
@ -200,11 +200,14 @@ setcookie ("TestCookie", $value,time()+3600, "/~rasmus/", ".utoronto.ca", 1);
|
|||
<title><function>setcookie</function> delete examples</title>
|
||||
<programlisting role="php">
|
||||
setcookie ("TestCookie");
|
||||
setcookie ("TestCookie", "", time());
|
||||
setcookie ("TestCookie", "", time(), "/~rasmus/", ".utoronto.ca", 1);
|
||||
// set the expiration date to one minute ago
|
||||
setcookie ("TestCookie", "", time() - 3600);
|
||||
setcookie ("TestCookie", "", time() - 3600, "/~rasmus/", ".utoronto.ca", 1);
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
When deleting a cookie you should assure that the expiration date
|
||||
is in the past, to trigger the removal mechanism in your browser.
|
||||
</para>
|
||||
<para>
|
||||
Note that the value portion of the cookie will automatically be
|
||||
urlencoded when you send the cookie, and when it is received, it
|
||||
|
|
Loading…
Reference in a new issue