Beispiel #1
0
 /**
  * 验证验证码
  *
  * @param string $field 表单字段
  *
  * @return bool
  */
 public function auth($field = 'code')
 {
     return !isset($_POST[$field]) || strtoupper($_POST[$field]) == Code::get();
 }
Beispiel #2
0
 public function captcha($field, $value, $params, $data)
 {
     $post = Request::post();
     return isset($post[$field]) && strtoupper($post[$field]) == \Code::get();
 }