From 5003cd4574fdc008317db3412f1e8f8657c00ea9 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 19 Aug 2016 11:21:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BUrl=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=AF=B9=E5=8F=AF=E9=80=89=E5=8F=82=E6=95=B0=E7=9A=84=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Url.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/Url.php b/library/think/Url.php index a2d5e3d0..fc872f59 100644 --- a/library/think/Url.php +++ b/library/think/Url.php @@ -260,7 +260,7 @@ class Url $url = str_replace(['[:' . $key . ']', '<' . $key . '?>', ':' . $key . '', '<' . $key . '>'], $vars[$key], $url); unset($array[$key]); } else { - $url = str_replace(['[:' . $key . ']', '<' . $key . '?>'], '', $url); + $url = str_replace(['/[:' . $key . ']', '[:' . $key . ']', '<' . $key . '?>'], '', $url); } } $match = true; @@ -288,7 +288,7 @@ class Url $url = str_replace(['[:' . $key . ']', '<' . $key . '?>', ':' . $key . '', '<' . $key . '>'], $vars[$key], $url); unset($vars[$key]); } elseif (2 == $val) { - $url = str_replace(['[:' . $key . ']', '<' . $key . '?>'], '', $url); + $url = str_replace(['/[:' . $key . ']', '[:' . $key . ']', '<' . $key . '?>'], '', $url); } else { return false; }