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(); // 输出图像