davidlienhard/sessionhandler
最新稳定版本:1.1.9
Composer 安装命令:
composer require davidlienhard/sessionhandler
包简介
🐘 php sessionhandler using database connection
README 文档
README
🐘 php sessionhandler using a database connection
Setup
You can install through composer with:
composer require davidlienhard/sessionhandler:^1
Note: davidlienhard/sessionhandler requires PHP 8.0
Example
<?php declare(strict_types=1); use DavidLienhard\SessionHandler\SessionHandler; $sessionHandler = new SessionHandler($db); // create session handler object session_set_save_handler($sessionHandler); // set custom session handler session_start(); // start session
Requirements
There must be an existing database connection using davidlienhard/database. This database object must be passed to the constructor.
Database-Table
A table with the name sessions with the following structure must exist in the database.
CREATE TABLE `sessions` ( `sessionID` varchar(100) NOT NULL PRIMARY KEY, `sessionLastSave` int DEFAULT NULL, `sessionData` text );
License
The MIT License (MIT). Please see LICENSE for more information.
统计信息
- 总下载量: 5.49k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-14