Changes
This commit is contained in:
10
vendor/topthink/think-captcha/src/Captcha.php
vendored
10
vendor/topthink/think-captcha/src/Captcha.php
vendored
@@ -12,7 +12,6 @@
|
||||
namespace think\captcha;
|
||||
|
||||
use think\Session;
|
||||
use think\Cache;
|
||||
|
||||
/**
|
||||
* @property mixed seKey
|
||||
@@ -231,14 +230,7 @@ class Captcha
|
||||
$secode['verify_code'] = $code; // 把校验码保存到session
|
||||
$secode['verify_time'] = time(); // 验证码创建时间
|
||||
Session::set($key . $id, $secode, '');
|
||||
//存储到数据库
|
||||
// Db::table('t_captcha')->insert(array(
|
||||
// 'code'=>$code,
|
||||
// 'vkey'=>md5($id),
|
||||
// 'time'=> time()
|
||||
// ));
|
||||
//存储到缓存
|
||||
Cache::set(md5($id),$code,3600);
|
||||
|
||||
ob_start();
|
||||
// 输出图像
|
||||
imagepng($this->im);
|
||||
|
||||
Reference in New Issue
Block a user