thinkphp5 verification code library
<div>{:captcha_img()}</div>
or
<div><img src="//m.sbmmt.com/m/xiazai/leiku/{:captcha_src()}" alt="captcha" /></div>
上面两种的最终效果是一样的
Just use TP5’s built-in verification feature
$this->validate($data,[ 'captcha|验证码'=>'require|captcha' ]);
Or verify manually
if(!captcha_check($captcha)){ //验证失败 };
All resources on this website are contributed and published by netizens, or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this website are for learning and reference only. Please do not use them for commercial purposes, otherwise you will be responsible for all consequences incurred! If there is any infringement, please contact us to delete and remove it. Contact information: admin@php.cn