* adjust for ztSessionHandler.

This commit is contained in:
wangyidong
2022-09-29 09:36:17 +08:00
parent 445bbb276a
commit a4ae767404

View File

@@ -996,7 +996,14 @@ class baseRouter
if($writable)
{
$ztSessionHandler = new ztSessionHandler($_GET['tid']);
session_set_save_handler($ztSessionHandler, true);
session_set_save_handler(
array($ztSessionHandler, "open"),
array($ztSessionHandler, "close"),
array($ztSessionHandler, "read"),
array($ztSessionHandler, "write"),
array($ztSessionHandler, "destroy"),
array($ztSessionHandler, "gc")
);
}
}
@@ -3140,7 +3147,7 @@ class EndResponseException extends \Exception
*
* @package framework
*/
class ztSessionHandler implements SessionHandlerInterface
class ztSessionHandler
{
public $sessSavePath;
public $tagID;
@@ -3160,6 +3167,7 @@ class ztSessionHandler implements SessionHandlerInterface
{
$this->tagID = $tagID;
ini_set('session.save_handler', 'files');
register_shutdown_function('session_write_close');
}
/**