美文网首页
php刷新验证码在谷歌浏览器好使 火狐不好使

php刷新验证码在谷歌浏览器好使 火狐不好使

作者: 玛瑙鑫 | 来源:发表于2020-01-14 14:06 被阅读0次

每次请求的时候加个时间

// 正常账号密码登录刷新图片验证码
    function refresh_captcha() {
        let time = new Date().getTime();
        $('#captcha_image').attr('src', "{:url('public/captcha')}?time="+time);
    }

自定义验证码信息

public function captcha()
    {
        $config = [
            // 验证码位数
            'length' => 4,
            'codeSet' => '1234567890',
        ];
        $captcha = new Captcha($config);
        return $captcha->entry();
    }

相关文章

网友评论

      本文标题:php刷新验证码在谷歌浏览器好使 火狐不好使

      本文链接:https://www.haomeiwen.com/subject/rvfaactx.html