jizhicms 图片验证码使用方法

曹え 5811 发布于:2022-01-21 08:25:32

html

<input id="vercode" class="required" name="vercode" type="text"
autocomplete="off">
<img src="{fun U('Common/vercode')}" alt="验证码" onclick="this.src=this.src+'?'+Math.random();" class="Verify_img kk4">


php 接收验证

$vercode = strtolower($this->frparam('vercode',1));

if($_SESSION['frcode']!=md5(md5($vercode))){
Error('Verification code error!');
}


觉得有用请点个赞吧!
1 469