clear unrelevant files
This commit is contained in:
+3
-3
@@ -3,14 +3,14 @@
|
||||
if (session_status() === PHP_SESSION_NONE) {
|
||||
|
||||
// Derive cookie path dynamically from the current script location.
|
||||
// e.g. /tr3wms/app/login/api/engine/login_otp.php → /tr3wms/
|
||||
// e.g. /wms/app/login/api/engine/login_otp.php → /wms/
|
||||
// This relies on the app always living one level under the repo root:
|
||||
// DOCUMENT_ROOT/
|
||||
// tr3wms/ ← repo root (cookie path)
|
||||
// wms/ ← repo root (cookie path)
|
||||
// app/
|
||||
// session.php ← this file is always inside app/
|
||||
$parts = explode('/', trim($_SERVER['SCRIPT_NAME'], '/'));
|
||||
$repo_name = '/' . $parts[0] . '/'; // e.g. /tr3wms/
|
||||
$repo_name = '/' . $parts[0] . '/'; // e.g. /wms/
|
||||
|
||||
ini_set('session.use_strict_mode', 1);
|
||||
ini_set('session.gc_maxlifetime', 3600);
|
||||
|
||||
Reference in New Issue
Block a user