mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进cookie函数支持有效期传入
This commit is contained in:
@@ -220,7 +220,7 @@ function session($name, $value = '', $prefix = null)
|
||||
}
|
||||
}
|
||||
|
||||
function cookie($name, $value = '')
|
||||
function cookie($name, $value = '', $option = null)
|
||||
{
|
||||
if (is_array($name)) {
|
||||
// 初始化
|
||||
@@ -236,7 +236,7 @@ function cookie($name, $value = '')
|
||||
return \think\Cookie::delete($name);
|
||||
} else {
|
||||
// 设置session
|
||||
return \think\Cookie::set($name, $value);
|
||||
return \think\Cookie::set($name, $value, $option);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user