<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [![](http://static.phpgrace.com/statics/images/downcode.png)](http://www.phpgrace.com/tools/download/5.html) # 驗證碼繪制類 ## **功能說明** 生成圖片驗證碼,并使用 cookie 記錄。 ![未命名-1.png](http://www.phpgrace.com/statics/images/201804/1524103962103716.png "1524103682724301.png") ## **部署說明** > 將?verifyCode.php?文件部署到phpGrace/tools文件夾下即可。 ## **使用演示(在入口頁面開啟 session,說明見代碼注釋)** ~~~ <?php class?indexController?extends?grace{ ????public?function?index(){ ????????//提交比對 ????????if(PG_POST){ ????????????//比對驗證碼 ????????????if($_POST['yzm']?!=?getSession('pgVcode')){ ????????????????echo?'驗證碼錯誤'; ????????????}else{ ????????????????echo?'驗證碼正確'; ????????????} ????????} ????} ???? ????//繪制驗證碼 ????public?function?vcode(){ ????????/* ?????????*?verifyCode?參數 ?????????*?1、圖片寬度 ?????????*?2、圖片高度 ?????????*?3、字符總數 ?????????*?4、包含數字的數量 ?????????*?5、字體【可省參數?默認:AMBROSIA.ttf,如需更換請將字體文件部署到?phpGrace/fonts?文件夾下】 ?????????*/ ????????$vcode?=?new?phpGrace\tools\verifyCode(88,?32,?4,?1); ????????/* ?????????*?可修改屬性 ????????$vcode->bgcolor???=?array(255,?0,?0);?//驗證碼背景顏色 ????????$vcode->codeColor?=?array(0,?255,?0);?//驗證碼文本顏色 ????????$vcode->fontSize??=?30;?//驗證碼文字大小 ????????$vcode->noise?????=?false;?//是否繪制干擾字符 ????????$vcode->noiseNumber?=?10;?//干擾字符數量 ????????$vcode->sessionName??=?'yourname';?//保存驗證碼的?session?名稱 ????????*/ ????????//繪制驗證碼 ????????$vcode->draw();???? ????} } 利用視圖展示驗證碼,提交?POST?數據 <html> <head> <title></title> </head> <body> <form?action=""?method="post"> ????驗證碼?:?<br?/> ????<input?type="text"?name="yzm"?/><img?src="/index/vcode"?onclick="changeVcode(this);"?/><br?/> ????<input?type="submit"?id=""?value="提交"?/> </form> <script?type="text/javascript"> //點擊更換驗證碼 function?changeVcode(vcodeImg){ ????vcodeImg.setAttribute('src',?'/index/vcode/'?+?Math.random()); } </script> </body> </html> ~~~
                  <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>

                              哎呀哎呀视频在线观看