From a5bb4ec00225ed02116016a9358075cfdfa23d09 Mon Sep 17 00:00:00 2001 From: dingguodong Date: Thu, 8 Jun 2023 17:57:04 +0800 Subject: [PATCH] + Improve the performance of concurrency requests with PHP session. --- framework/base/router.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework/base/router.class.php b/framework/base/router.class.php index b58beeddef..c74f5521a3 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -3261,6 +3261,7 @@ class super { if($tab) $_SESSION["app-$tab"][$key] = $value; $_SESSION[$key] = $value; + session_write_close(); } elseif($this->scope == 'env') { @@ -3307,6 +3308,7 @@ class super } elseif($this->scope == 'session') { + if(session_status() !== PHP_SESSION_ACTIVE) session_start(); $tab = $this->tab; if($tab and isset($_SESSION["app-$tab"][$key])) return $_SESSION["app-$tab"][$key]; if(isset($_SESSION[$key])) return $_SESSION[$key];