mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-09 16:12:49 +08:00
response类增加create方法 改进think\response\redirect类 改进助手函数和traits\controller\Jump
This commit is contained in:
@@ -30,10 +30,11 @@ class Redirect extends Response
|
||||
*/
|
||||
protected function output($data)
|
||||
{
|
||||
$this->isExit = true;
|
||||
$url = preg_match('/^(https?:|\/)/', $data) ? $data : Url::build($data, $this->params);
|
||||
$this->header['Location'] = $url;
|
||||
$this->header['status'] = isset($this->header['status']) ? $this->header['status'] : 301;
|
||||
$this->isExit = true;
|
||||
$url = preg_match('/^(https?:|\/)/', $data) ? $data : Url::build($data, $this->params);
|
||||
$this->header['Location'] = $url;
|
||||
$this->header['status'] = isset($this->header['status']) ? $this->header['status'] : 301;
|
||||
$this->header['Cache-control'] = 'no-cache,must-revalidate';
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user