adasd
This commit is contained in:
24
public/admin/session-debug.php
Normal file
24
public/admin/session-debug.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
$configPath = dirname(__DIR__) . '/../inc/config.php';
|
||||
if (is_file($configPath)) {
|
||||
require_once $configPath;
|
||||
}
|
||||
|
||||
if (session_status() === PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
$sessionName = session_name();
|
||||
$sessionId = session_id();
|
||||
$cookies = $_COOKIE;
|
||||
$sessionData = $_SESSION ?? [];
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
echo json_encode([
|
||||
'session_name' => $sessionName,
|
||||
'session_id' => $sessionId,
|
||||
'cookies' => $cookies,
|
||||
'session' => $sessionData,
|
||||
], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
|
||||
Reference in New Issue
Block a user