kavalanche/sql-session-handler
最新稳定版本:v1.0.1
Composer 安装命令:
composer require kavalanche/sql-session-handler
包简介
SQL session handler for PHP
README 文档
README
SQL session handler for PHP
Usage
Require
kavalanche/sql-session-handler.composer require kavalanche/sql-session-handlerCreate instance of
Kavalanche\SqlSessionHandler\SqlSessionHandlerand inject your database handle (PDO) into it.$SqlSessionHandler = new Kavalanche\SqlSessionHandler\SqlSessionHandler($db); session_set_save_handler($SqlSessionHandler); session_start();
Database structure
CREATE TABLE `session` (
`id` char(32) CHARACTER SET ascii NOT NULL,
`timestamp` int(10) unsigned NOT NULL,
`data` longtext NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
Configuration
You can change session table name in config/sql-session-handler.yaml placed in the root of your application.
Default value is:
session-table-name: session
统计信息
- 总下载量: 60
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2024-01-27