切换验证码
document.getElementById('img_code_1').src="__URL__/verify/"+Math.random(1,9999);
生成验证码
<img src="{:U('Home/User/verify',array())}" id="img_code_1" style="width: 120px;height: 42px;margin-left: 10px;">
//验证码
public function verify() { $Verify = new \Think\Verify(); $Verify->entry(); } //检验验证码 function check_verify($code, $id = ''){ $verify = new \Think\Verify(); return $verify->check($code, $id); }