From cba67a4c683c734a7a8a8f09125f9d6c6fad3004 Mon Sep 17 00:00:00 2001 From: charles Date: Thu, 11 Apr 2019 12:00:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E7=9A=84session.prefix=E5=AF=BC=E8=87=B4=E5=9B=BE=E5=BD=A2?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E9=AA=8C=E8=AF=81=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E4=B8=8D=E6=AD=A3=E7=A1=AE=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Captcha.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Captcha.php b/src/Captcha.php index 29f9dad..5f73b34 100644 --- a/src/Captcha.php +++ b/src/Captcha.php @@ -11,6 +11,7 @@ namespace think\captcha; +use think\facade\Config; use think\facade\Session; class Captcha @@ -198,7 +199,7 @@ public function entry($id = '') $secode = []; $secode['verify_code'] = $code; // 把校验码保存到session $secode['verify_time'] = time(); // 验证码创建时间 - Session::set($key . $id, $secode, ''); + Session::set($key . $id, $secode, Config::pull('session.prefix')); ob_start(); // 输出图像