开发者

Where will be the session value will be store in PHP

Where will be the session value will be store in PHP.

For example, cookies will be 开发者_JS百科stored in browser as well as where will be the session value will be store.

thanks in advance...


By default the session values are stored on the filesystem under the PHP directory (on windows at least). You can find the default session location by using the session_save_path function.

You can write your own session handlers to persist session data elsewhere, such as to a database. Look at the session_set_save_handler function for more information.


In PHP, the session values are stored in the server. PHP sessions store only an ID cookie on the user's system which is used to reference the session file on the server. As such, the user has no access to the content of the session file, thereby providing a secure alternative to cookies.
PHP sessions also work when the user has disabled the browser's cookie support. In this situation it includes the session ID information in the web page URLs.

You can also find some more concepts in the PHP Manual Site.
Another very good knowledge about session is given in this PDF file, which tells about the Session Fixation Vulnerability in Web-based Applications.

Hope it helps.


Under /tmp in a plain text file on Unix like environments.


It is set at php.ini as session.save_path

Its default is /tmp but you can change it


You are able to set the save path yourself using session_save_path.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜