mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 07:02:47 +08:00
改进Input类和Request类的session获取
This commit is contained in:
@@ -13,6 +13,7 @@ namespace think;
|
||||
|
||||
use think\Config;
|
||||
use think\File;
|
||||
use think\Session;
|
||||
|
||||
class Input
|
||||
{
|
||||
@@ -129,10 +130,7 @@ class Input
|
||||
*/
|
||||
public static function session($name = '', $default = null, $filter = null, $merge = false)
|
||||
{
|
||||
if (PHP_SESSION_DISABLED == session_status()) {
|
||||
session_start();
|
||||
}
|
||||
return self::data($_SESSION, $name, $default, $filter, $merge);
|
||||
return self::data(Session::get(), $name, $default, $filter, $merge);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user