Re: setcookie undocumented feature
| From: | Gabor Hojtsy | Date: | Fri, 27 Sep 2002 17:14:00 +0000 |
| Subject: | Re: setcookie undocumented feature | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969348852@lists.php.net to get a copy of this message | ||
> When I was doing some security tests, I walked into some small problems,
and
> did some tests with the returned headers. It seemed that if I used the
> setcookie function with a value of null, the expiration time argument
seemed
> to be ignored. Instead, the value was replaced with the text 'deleted',
and
> the expiration time was set to 26 hours ago.
>
> Is this the way the function should behave? I liked the syntax very much
> this way:
>
> function cookie_destroy()
> {
> foreach($_COOKIE as $name => $value)
> {
> setcookie($name, null, time() - 3600, "/");
> }
> }
>
> If this really is a built-in feature, I would very much like to see it
back
> in the PHP documentation.
Please submit this as a documentation problem if you would like to see
this in the docs.
Goba