视图层

<div class="loginbox-textbox">
  <input class="form-control" placeholder="请输入验证码" name="captcha" type="text"/>
  <img id="cap" alt="验证码" title="点击刷新" style="width:220px;cursor: pointer;    margin: 20px 0;border:2px solid rgb(220, 222, 224);" onclick="this.src='{:captcha_src()}'" src="{:captcha_src()}"/>
</div>

 

控制器验证

//接收数据
$captcha = input("post");


if(!captcha_check($captcha['captcha'])){
     //输入的验证码错误
}else{
        //输入的验证码正确
}

 

相关文章:

  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-27
  • 2021-11-29
  • 2022-02-03
猜你喜欢
  • 2022-12-23
  • 2021-12-04
  • 2021-12-15
  • 2021-06-17
  • 2021-11-19
  • 2021-08-12
  • 2021-11-20
相关资源
相似解决方案