两种验证码验证实现,一种直接在form表单提交按钮实现验证,一种使用ajax传递参数实现验证:
1、直接在form表单提交按钮实现验证,在控制器VerifyController.class.php中写入如下代码:
namespace Home\Controller;
use Think\Controller;
class VerifyController extends Controller {
public function index() {
$this->display();
:palm_tree: Palmtree Form
PHP Form builder with v4 classes, validation, support and other goodies
Requirements
PHP >= 5.6
jQuery (If you want to use Recaptcha and/or AJAX)
Installation
Use composer to add the package to your dependencies:
compos