function check_verify($code, $id=''){
$verify = new \Think\Verify();
return $verify->check($code, $id);
}
//前台表单post提交
<form action="{:U('User/form_check')}" method="post">
<input type='text' name='code' />
<img src="{:U('User/verify')}">
<input type="submit" value='提交'>
</form>
输出的post.code始终和session不一致
最佳答案