国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

captcha字體存在問題

forwebreg

問題描述

這里寫描述
使用算數(shù)的時候 加號和等于符號部分字體加載不正常
截圖

程序代碼或配置

    /**
     * 驗證碼
     */
    public function verifyImg($hashid = '0000', $math = false)
    {
        $builder = new CaptchaBuilder(); // 初始化驗證碼類
        $builder->setBackgroundColor(255, 255, 255);
        if ($math) {
            $x   = random_int(10, 30);
            $y   = random_int(1, 9);
            $phrase = "{$x} + {$y} = ";
            $builder->setPhrase($phrase);
            $result = $x + $y;
        }
        $builder->setDistortion(false);
        $builder->setMaxBehindLines(0);
        $builder->setMaxFrontLines(0);
        $builder->build(); // 生成驗證碼
        Cache::set('captcha_' . $hashid, $math ? $result : strtolower($builder->getPhrase()), 900); // 緩存驗證碼數(shù)據(jù)
        $img_content = $builder->get(); // 獲得驗證碼圖片二進(jìn)制數(shù)據(jù)
        return response($img_content, 200, ['Content-Type' => 'image/jpeg']); // 輸出驗證碼二進(jìn)制數(shù)據(jù)
    }
717 1 0
1個回答

walkor 打賞

升級下
composer require webman/captcha ^1.0.4

  • 暫無評論
年代過于久遠(yuǎn),無法發(fā)表回答
??