From 8f213a113a5e5386200c1e8c325c9a8a62931135 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 14 Dec 2015 11:43:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BRoute=E7=B1=BB=E7=9A=84getRou?= =?UTF-8?q?teUrl=E6=96=B9=E6=B3=95=E6=94=AF=E6=8C=81=20=E5=9C=A8=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E5=88=AB=E5=90=8D=E5=90=8E=E9=9D=A2=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E4=BC=A0=E5=85=A5=E5=8F=82=E6=95=B0=E7=9A=84=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/route.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/think/route.php b/library/think/route.php index 61d03045..ffd66316 100644 --- a/library/think/route.php +++ b/library/think/route.php @@ -644,6 +644,11 @@ class Route // 根据路由别名和参数获取URL地址 public static function getRouteUrl($name, $params = []) { + if (strpos($name, '?')) { + // [路由别名?]参数1=值1&参数2=值2... + list($name, $parsms) = explode('?', $name); + } + if (!empty(self::$alias[$name])) { $url = self::$alias[$name]; if (is_string($params)) {