From 19cc11c59e9b4015827b0b8fe9b6cd4872f1d319 Mon Sep 17 00:00:00 2001 From: yunwuxin <448901948@qq.com> Date: Mon, 13 Jun 2016 17:05:37 +0800 Subject: [PATCH] =?UTF-8?q?Redirect=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=9C=B0=E5=9D=80=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/response/Redirect.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/library/think/response/Redirect.php b/library/think/response/Redirect.php index c60c007f..f6604039 100644 --- a/library/think/response/Redirect.php +++ b/library/think/response/Redirect.php @@ -39,6 +39,16 @@ class Redirect extends Response return; } + /** + * 获取跳转地址 + * @return string + */ + public function getTargetUrl() + { + $this->getContent(); + return $this->header['Location']; + } + public function params($params = []) { $this->params = $params;