Session类增加flash方法用于设置下一次请求有效的值 flush方法用于清空当前请求有效的值 增加push方法

Redirect response类的with方法改为调用session类的flash方法
This commit is contained in:
thinkphp
2016-10-19 15:16:31 +08:00
parent 53233db821
commit a25b16b0cf
3 changed files with 61 additions and 4 deletions

View File

@@ -53,10 +53,10 @@ class Redirect extends Response
{
if (is_array($name)) {
foreach ($name as $key => $val) {
Session::set($key, $val);
Session::flash($key, $val);
}
} else {
Session::set($name, $value);
Session::flash($name, $value);
}
return $this;
}