<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                [TOC] ### 組件說明 > captcha是一個簡單的驗證碼生成組件。 ### 配置選項 | 配置名 | 參數類型 | 可選 | 默認值 | 說明 | | --- | --- | --- | --- | --- | | class | string | 是 | lying\captcha\Captcha | 可配置 | | length | int | 是 | 4 | 驗證碼長度 | | width | int | 是 | 120 | 驗證碼寬 | | height | int | 是 | 40 | 驗證碼高 | | lines | int | 是 | 10 | 干擾線條數 | | fonts | array | 是 | [] | 額外的字體文件絕對路徑地址 | | bg | array | 是 | [255, 255, 255] | 背景色 | | fontSize | int | 是 | 20 | 字體大小 | | noisy | int | 是 | 50 | 噪點數量 | | expire | int | 是 | 120 | 驗證碼有效期(秒) | ### 示例配置 ~~~php //驗證碼組件 'captcha' => [ 'class' => 'lying\captcha\Captcha', 'length' => 4, //驗證碼長度 'width' => 120, //寬 'height' => 40, //高 'lines' => 10, //干擾線條數 'fonts' => [], //額外的字體文件絕對路徑地址 'bg' => [255, 255, 255], //背景色 'fontSize' => 20, //字體大小 'noisy' => 50, //噪點 'expire' => 120, //驗證碼有效期 ], ~~~ ### 調用方式 ~~~php \Lying::$maker->captcha(); \Lying::$maker->captcha; \Lying::$maker->get('captcha'); ~~~ ### 使用方式 ~~~php $captcha = \Lying::$maker->captcha; //生成驗證碼,會直接輸出圖片 $captcha->render(); //校驗驗證碼 $captcha->check('abcd'); ~~~ 鑒于不同的場景需要不同的驗證碼,驗證碼生成或者校驗可以帶上場景值: ~~~php $captcha = \Lying::$maker->captcha; $scene = 'login'; //生成驗證碼,會直接輸出圖片,驗證碼有效期60秒 $captcha->render($scene, 60); //校驗驗證碼,如果驗證碼輸錯了,可以重新校驗(第三個參數設置為false表示非一次性驗證) $captcha->check('abcd', $scene, false); ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看