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

2020-01-14  本文已影响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();
    }
上一篇 下一篇

猜你喜欢

热点阅读