b9058d036e
In PHP 5.4 they added this class that encased the callback functions. The difficulty came with needing to fallback to the previously registered session handler. Closes #792
15 linhas
345 B
PHP
15 linhas
345 B
PHP
<?php
|
|
|
|
$session_handler = new SessionHandler();
|
|
session_set_save_handler(
|
|
array($session_handler, 'open'),
|
|
array($session_handler, 'close'),
|
|
array($session_handler, 'read'),
|
|
array($session_handler, 'write'),
|
|
array($session_handler, 'destroy'),
|
|
array($session_handler, 'gc')
|
|
);
|
|
|
|
$_SESSION['a'] = 'A';
|
|
var_dump($_SESSION);
|