Example #1
0
 /**
  *
  * @param  string $error 出错时设置
  *
  * @return true or false
  */
 function checkForm($input, $method, &$error)
 {
     if ($this->_form_secret) {
         $k = 'form_' . get_class($this) . '_' . $method;
         if (!isset($_SESSION)) {
             session();
         }
         if ($_COOKIE[$k] != $_SESSION[$k]) {
             $error = '错误的请求';
             return false;
         }
     }
     $this->_form_();
     return Form::checkInput($input, $this->_form, $error);
 }