改进Response类 改进view助手函数 增加 think\response\Html 类

This commit is contained in:
thinkphp
2016-05-16 15:16:47 +08:00
parent 199825ec32
commit 30a6bd7e8a
6 changed files with 141 additions and 22 deletions

View File

@@ -104,12 +104,13 @@ trait Jump
* URL重定向
* @access protected
* @param string $url 跳转的URL表达式
* @param array|int $params 其它URL参数或http code
* @param integer $code http code
* @param array $params 其它URL参数
* @return void
*/
public function redirect($url, $params = [])
public function redirect($url, $code = 301, $params = [])
{
Response::create()->isExit(true)->redirect($url, $params);
Response::create('redirect')->data($url)->code($code)->params($params);
}
}