You are here: Re: [PHP] CookieMonster « PHP « IT news, forums, messages
Re: [PHP] CookieMonster

Posted by Philip Hallstrom on 10/20/29 11:26

> You can.. Dont include the expire argument.. or set it to 0.

You sure?

The manual says (last sentence):

expire

The time the cookie expires. This is a Unix timestamp so is in number of
seconds since the epoch. In other words, you'll most likely set this with
the time() function plus the number of seconds before you want it to
expire. Or you might use mktime().

time()+60*60*24*30 will set the cookie to expire in 30 days. If not set,
the cookie will expire at the end of the session (when the browser
closes).



>
> Jason
>
> On 9/1/05, Philip Hallstrom <php@philip.pjkh.com> wrote:
>>
>>> Simple question I guess..
>>>
>>> How do I set a cookie so it will never expire? (I don't want it to
>> expire)
>>
>> You can't really... I could delete it and that would be the same as
>> expiring it...
>>
>> Best you can do is set it to expire 100 years in the future or some
>> such... see the manual for SetCookie() for more info...
>>
>> -philip
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация