You are here: Re: where does php place cookies? « PHP Programming Language « IT news, forums, messages
Re: where does php place cookies?

Posted by Gordon Burditt on 11/24/63 11:28

>If it does reside in RAM, how can you set it to have a lifetime of
>years? Once the user turns the computer off, doesn't this flush the
>system memory and thus kill any cookie settings that were set?

Look at the PHP documentation for setcookie(). A session-only
cookie (one created by calling setcookie with an expire time of 0)
will expire when the browser is closed. It doesn't have an expire
time, and might manage to last more than 2 years if the browser
stays open that long. It's not stored on disk, at least in most
browsers.

A non-session-only cookie will have an expire time, often given to
setcookie() as time() + a number of seconds to last. These cookies
will be stored on disk somewhere. Where depends on the browser,
but it's likely to be in a similar place to where the browser
configuration parameters are stored.

Gordon L. Burditt

 

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

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