mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
request_id prefix think about SCRIPT_NAME
This commit is contained in:
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
@@ -19,7 +19,7 @@ if (!defined('REQUEST_ID')) {
|
|||||||
} elseif (!empty($_SERVER['REQUEST_ID'])) {
|
} elseif (!empty($_SERVER['REQUEST_ID'])) {
|
||||||
$requestId = $_SERVER['REQUEST_ID'];
|
$requestId = $_SERVER['REQUEST_ID'];
|
||||||
} else {
|
} else {
|
||||||
$prefix = implode('', $_SERVER['argv'] ?? []);
|
$prefix = ($_SERVER['SCRIPT_FILENAME'] ?? '') . implode('', $_SERVER['argv'] ?? []);
|
||||||
$requestId = bin2hex(random_bytes(11)) . str_replace('.', '', substr(uniqid($prefix, true), 12, 10));
|
$requestId = bin2hex(random_bytes(11)) . str_replace('.', '', substr(uniqid($prefix, true), 12, 10));
|
||||||
}
|
}
|
||||||
define('REQUEST_ID', $requestId);
|
define('REQUEST_ID', $requestId);
|
||||||
|
|||||||
Reference in New Issue
Block a user