mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
增加token助手函数 用于在页面快速显示令牌
This commit is contained in:
@@ -1416,7 +1416,9 @@ class Request
|
||||
{
|
||||
$type = is_callable($type) ? $type : 'md5';
|
||||
$token = call_user_func($type, $_SERVER['REQUEST_TIME_FLOAT']);
|
||||
|
||||
if ($this->isAjax()) {
|
||||
header($name . ': ' . $token);
|
||||
}
|
||||
Session::set($name, $token);
|
||||
return $token;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user