Download the PHP package laocc/session without Composer
On this page you can find all versions of the php package laocc/session. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download laocc/session
More information about laocc/session
Files in laocc/session
Download laocc/session
More information about laocc/session
Files in laocc/session
Vendor laocc
Package session
Short Description php session
License
Homepage https://github.com/laocc/session
Package session
Short Description php session
License
Homepage https://github.com/laocc/session
Please rate this library. Is it a good library?
Informations about the package session
安装:
composer:
引用方法:
数据说明:
若某页面原则上是不会改变任何session,为保险起见,可在页面任何地方加:session_abort();用于丢弃当前进程所有对session的改动;
本类只是改变PHP存取session的介质,在使用方面没有影响,如:$_SESSION['v']=123
,$v=$_SESSION['v']
;
本插件实现用redis保存session,且每个session的生存期从其自身被定义时计算起,而非PHP本身统一设置
有一个问题须注意:$_SESSION['name']=abc
;之后若再次给$_SESSION['name']
赋其他不同的值,则其生存期以第二次赋值起算起 但是,若第二次赋值与之前的值相同,并不会改变其生存期
简单设置
如果只是想存到redis也可以直接设置,或修改php.ini
:
file查看session
php.ini中默认保存到PHP,也就是服务器某个目录中, 比如默认:session.save_path = "/tmp"
在/tmp
中所有[sess_****]
文件即为session内容
redis中查看session
如果指定redis作为介质,则用下列方法可查看session内容
列出所有键:
显示内容:
All versions of session with dependencies
PHP Build Version
Package Version
The package laocc/session contains the following files
Loading the files please wait ....