From e37f5aee16219ecf02069290d69b74187aa40bb2 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 14 Sep 2016 16:16:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=96=B9=E6=B3=95=E7=9A=84?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=8C=89=E7=85=A7URL=E9=A1=BA=E5=BA=8F?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=90=8D=E5=8F=AA=E8=83=BD=E7=94=A8pathinfo=E5=8F=98?= =?UTF-8?q?=E9=87=8F=20=E4=B8=8D=E6=94=AF=E6=8C=81get=E6=88=96=E8=80=85pos?= =?UTF-8?q?t=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/App.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/think/App.php b/library/think/App.php index 20c671fc..12748712 100644 --- a/library/think/App.php +++ b/library/think/App.php @@ -237,7 +237,11 @@ class App { if (empty($vars)) { // 自动获取请求变量 - $vars = Request::instance()->param(); + if (Config::get('url_param_type')) { + $vars = Request::instance()->route(); + } else { + $vars = Request::instance()->param(); + } } $args = []; // 判断数组类型 数字数组时按顺序绑定参数