<div class= "Verify_code CF G-hidden" id= "J-actionupload-sheet-verifycode" > <dl class= "CF" > < Dt> Verification Code <span>*</span></dt> <dd><input class= "TextInput" name= "Verify_code" type= "Text" Required><a title= "for a" href= "javascript:;" > Change </a></dd> </dl> <p class= "g-validator-msg" data-validator-target= "Verify_ Code "data-validator-msg=" Please enter the verification code "></p> </div>
Verification Method:
Public Function Verify () { $config =array ( ' fontSize ' = + , //Captcha font size (px) ' Usenoise ' =>false, ' Usecurve ' =>false ); $verify = new \think\verify ($config); $verify->entry (1); }
if(!$this->check_verify (Trim(I (' Post.verify_code ')))){ $json[' rst ']= ' 9 '; $this->ajaxreturn ($json); } functionCheck_verify ($code,$id= 1){ $verify=New\think\verify (); return $verify->check ($code,$id); }
thinkphp system comes with verification code