修正EXP查询的参数绑定

This commit is contained in:
thinkphp
2016-09-13 17:17:01 +08:00
parent 3d868bc2d5
commit 79bdc2fd9a
2 changed files with 19 additions and 1 deletions

View File

@@ -42,6 +42,24 @@ class Redirect extends Response
return;
}
/**
* 重定向传值通过Session
* @access protected
* @param string|array $name 变量名或者数组
* @param mixed $value 值
* @return $this
*/
public function with($name, $value = null)
{
if (is_array($name)) {
foreach ($name as $key => $val) {
Session::set($key, $val);
}
} else {
Session::set($name, $value);
}
}
/**
* 获取跳转地址
* @return string