postString() public static method

获取post string数据
public static postString ( string $name, null $default = null ) : string | null
$name string 要获取的变量
$default null 未获取到$_POST值时返回的默认值
return string | null
示例#1
0
 /**
  * 类加载-检测token值
  *
  *  @return bool
  */
 public static function checkToken()
 {
     $token = Input::postString('CML_TOKEN');
     if (empty($token)) {
         return false;
     }
     if ($token !== self::getToken()) {
         return false;
     }
     unset($_COOKIE['CML_TOKEN']);
     return true;
 }