$this->validate($data,[
'captcha|验证码'=>'require|captcha'
]);
我在 火狐下是正常的,但是在谷歌浏览器和 Edge 浏览器下验证都是失败的。包括__token__验证也是失败的,不知道有没有人遇到此问题?
只能换成自己写代码验证了
$captcha=Request::instance->param();
if($captcha['__token__'] != session('__token__')){
$this->error('令牌验证失败');
}
if(authcode(strtoupper($captcha['captcha'])) !=$_SESSION["d2d977c58444271d9c780187e93f80e5"]["verify_code"]){
$this->error('验证码错误');
}
请高手指教 最佳答案
