From ac94906c91db2a86490f9a2a812645d4d2ee3b64 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 20 Jul 2016 17:37:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9Bdb=E5=8A=A9=E6=89=8B=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helper.php b/helper.php index 703cc273..57b8ae49 100644 --- a/helper.php +++ b/helper.php @@ -124,7 +124,7 @@ if (!function_exists('input')) { if ($pos = strpos($key, '.')) { // 指定参数来源 $method = substr($key, 0, $pos); - if (in_array($method, ['get', 'post', 'put', 'delete', 'param', 'request', 'session', 'cookie', 'server', 'env', 'path', 'file'])) { + if (in_array($method, ['get', 'post', 'put', 'patch', 'delete', 'param', 'request', 'session', 'cookie', 'server', 'env', 'path', 'file'])) { $key = substr($key, $pos + 1); } else { $method = 'param'; @@ -191,7 +191,7 @@ if (!function_exists('db')) { */ function db($name = '', $config = []) { - return Db::connect($config)->name($name); + return Db::connect($config, true)->name($name); } }