//验证码
public function verify()
{
$config = [
// 验证码字体大小
'fontSize' => 30,
// 验证码位数
'length' => 4,
// 关闭验证码杂点
'useNoise' => true,
// 验证码图片高度
'imageH' => 60,
// 验证码图片宽度
'imageW' => 200,
// 验证码过期时间(s)
'expire' => 1800,
];
$captcha = new Captcha($config);
return $captcha->entry();
}

在vendor\topthink\think-captcha\src目录下的Captcha.php中也可以配置


点赞(1) 打赏

Comment list 共有 0 条评论

暂无评论
立即
投稿
发表
评论
返回
顶部