日期:2011-12-17 浏览次数:20499 次
- <?php
- class SessionToDB
- {
- private $_path = null;
- private $_name = null;
- private $_pdo = null;
- private $_ip = null;
- private $_maxLifeTime = 0;
- public function __construct(PDO $pdo)
- {
- session_set_save_handler(
- array(&$this, 'open'),
- array(&$this, 'close'),
- array(&$this, 'read'),
- array(&$this, 'write'),
- array(&$this, 'destroy'),
- array(&$this, 'gc')
- );
- $this->_pdo =