top-think / think-captcha

thinkphp 验证码类库

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

同一张页面中有多个验证码,如何进行区分验证?

HeroTianTYJ opened this issue · comments

我控制器中写了两个生成验证码的方法:

public function captcha(){
	return Captcha::create(1);
}
public function captcha2(){
	return Captcha::create(2);
}

然后在同一张页面同时调用这两个验证码,分别对应两个输入框,请问如何使用Captcha::check()进行区分验证?tp6之前的验证码类库,check方法是可以传递id标识的呀