mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 23:52:49 +08:00
修正
This commit is contained in:
@@ -109,7 +109,7 @@ class Session
|
|||||||
*/
|
*/
|
||||||
public static function set($name, $value = '', $prefix = null)
|
public static function set($name, $value = '', $prefix = null)
|
||||||
{
|
{
|
||||||
!self::$active) && self::init();
|
!self::$active && self::init();
|
||||||
$prefix = !is_null($prefix) ? $prefix : self::$prefix;
|
$prefix = !is_null($prefix) ? $prefix : self::$prefix;
|
||||||
if (strpos($name, '.')) {
|
if (strpos($name, '.')) {
|
||||||
// 二维数组赋值
|
// 二维数组赋值
|
||||||
@@ -134,7 +134,7 @@ class Session
|
|||||||
*/
|
*/
|
||||||
public static function get($name = '', $prefix = null)
|
public static function get($name = '', $prefix = null)
|
||||||
{
|
{
|
||||||
!self::$active) && self::init();
|
!self::$active && self::init();
|
||||||
$prefix = !is_null($prefix) ? $prefix : self::$prefix;
|
$prefix = !is_null($prefix) ? $prefix : self::$prefix;
|
||||||
if ('' == $name) {
|
if ('' == $name) {
|
||||||
// 获取全部的session
|
// 获取全部的session
|
||||||
@@ -166,7 +166,7 @@ class Session
|
|||||||
*/
|
*/
|
||||||
public static function delete($name, $prefix = null)
|
public static function delete($name, $prefix = null)
|
||||||
{
|
{
|
||||||
!self::$active) && self::init();
|
!self::$active && self::init();
|
||||||
$prefix = !is_null($prefix) ? $prefix : self::$prefix;
|
$prefix = !is_null($prefix) ? $prefix : self::$prefix;
|
||||||
if (strpos($name, '.')) {
|
if (strpos($name, '.')) {
|
||||||
list($name1, $name2) = explode('.', $name);
|
list($name1, $name2) = explode('.', $name);
|
||||||
@@ -191,7 +191,7 @@ class Session
|
|||||||
*/
|
*/
|
||||||
public static function clear($prefix = null)
|
public static function clear($prefix = null)
|
||||||
{
|
{
|
||||||
!self::$active) && self::init();
|
!self::$active && self::init();
|
||||||
$prefix = !is_null($prefix) ? $prefix : self::$prefix;
|
$prefix = !is_null($prefix) ? $prefix : self::$prefix;
|
||||||
if ($prefix) {
|
if ($prefix) {
|
||||||
unset($_SESSION[$prefix]);
|
unset($_SESSION[$prefix]);
|
||||||
@@ -209,9 +209,7 @@ class Session
|
|||||||
*/
|
*/
|
||||||
public static function has($name, $prefix = null)
|
public static function has($name, $prefix = null)
|
||||||
{
|
{
|
||||||
if (!self::$active) {
|
!self::$active && self::init();
|
||||||
self::init();
|
|
||||||
}
|
|
||||||
$prefix = !is_null($prefix) ? $prefix : self::$prefix;
|
$prefix = !is_null($prefix) ? $prefix : self::$prefix;
|
||||||
if (strpos($name, '.')) {
|
if (strpos($name, '.')) {
|
||||||
// 支持数组
|
// 支持数组
|
||||||
|
|||||||
Reference in New Issue
Block a user