thinkphp6 front-end verification code separation and verification

1. The verification code interface generates a verification code:

public function verify(){
        return captcha();
}

You can also write your own method

2. The verification method is different from the normal mode session verification, and the original file needs to be changed:

 

 

 

 

 Modified code:

<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2015 http://thinkphp.c

Guess you like

Origin blog.csdn.net/mo3408/article/details/132362236