$ _SESSION变量存储在哪里? [英] Where are $_SESSION variables stored?

查看:108
本文介绍了$ _SESSION变量存储在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$_SESSION变量是否存储在客户端或服务器上?

Are $_SESSION variables stored on the client or the server?

推荐答案

$_SESSION变量存储的位置由PHP的session.save_path配置确定.通常在Linux/Unix系统上是/tmp.使用phpinfo()功能(如果不确定100%肯定)来查看您的特定设置,方法是在域的DocumentRoot中创建一个具有以下内容的文件:

The location of the $_SESSION variable storage is determined by PHP's session.save_path configuration. Usually this is /tmp on a Linux/Unix system. Use the phpinfo() function to view your particular settings if not 100% sure by creating a file with this content in the DocumentRoot of your domain:

<?php
    phpinfo();
?>

以下是此配置设置下PHP文档的链接:

Here is the link to the PHP documentation on this configuration setting:

http://php.net/manual/zh_CN/session.configuration.php#ini.session.save-path

这篇关于$ _SESSION变量存储在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆