From 5c329fdca7e338256b86c1650095ce3b225604ad Mon Sep 17 00:00:00 2001 From: "xiaobo.sun" Date: Sun, 9 Oct 2016 12:13:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8D=E6=94=AF=E6=8C=81pa?= =?UTF-8?q?rseName=E6=96=B9=E6=B3=95=E7=9A=84fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/helper.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/helper.php b/src/helper.php index 5c2e852..fabe325 100644 --- a/src/helper.php +++ b/src/helper.php @@ -11,6 +11,7 @@ use think\Hook; use think\Config; +use think\Loader; // 插件目录 define('ADDON_PATH', ROOT_PATH . 'addons' . DS); @@ -104,8 +105,8 @@ function addon_url($url, $param = []) { $url = parse_url($url); $case = config('url_convert'); - $addons = $case ? parse_name($url['scheme']) : $url['scheme']; - $controller = $case ? parse_name($url['host']) : $url['host']; + $addons = $case ? Loader::parseName($url['scheme']) : $url['scheme']; + $controller = $case ? Loader::parseName($url['host']) : $url['host']; $action = trim($case ? strtolower($url['path']) : $url['path'], '/'); /* 解析URL带的参数 */