iflamed/onesession
Composer 安装命令:
composer require iflamed/onesession
包简介
a session solution for mult language development
README 文档
README
a session solution for mult language development
StoreInterface
a store interface to connect with each cahce or database
version 1.0.0
now it is surpport the memcache session store with the memacche and memcached extension
useage
<?php
require 'vendor/autoload.php';
$cacheConfig = array(
'config'=>array(
array(
'host'=>'127.0.0.1',
'port'=>11211,
'weight'=>10,
),
),
'useMemcached'=>false,
);
$keyPrefix='localhost';
$storeClassName = 'MemcacheStore';
Onesession\HttpSession::init($storeClassName,$cacheConfig,$keyPrefix);
session_start();
$_SESSION['serialisation'] = 'should be in json';
if (!isset($_SESSION['a'])) {
$_SESSION['a'] = 0;
}
$_SESSION['a']++;
var_dump($_SESSION);
?>
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-03-03