Merge branch 'master' into lite

This commit is contained in:
王怡栋
2022-01-19 08:44:43 +08:00
254 changed files with 11731 additions and 2120 deletions
+26 -12
View File
@@ -1964,23 +1964,37 @@ class baseRouter
$defaultParams[$name] = $default;
}
/**
* 根据PATH_INFO或者GET方式设置请求的参数。
* Set params according PATH_INFO or GET.
*/
if($this->config->requestType != 'GET')
if ('cli' === PHP_SAPI)
{
$this->setParamsByPathInfo($defaultParams);
if ($this->params)
{
$this->params = array_merge($defaultParams, $this->params);
}
else
{
$this->params = $defaultParams;
}
}
else
{
$this->setParamsByGET($defaultParams);
}
/**
* 根据PATH_INFO或者GET方式设置请求的参数。
* Set params according PATH_INFO or GET.
*/
if($this->config->requestType != 'GET')
{
$this->setParamsByPathInfo($defaultParams);
}
else
{
$this->setParamsByGET($defaultParams);
}
if($this->config->framework->filterParam == 2)
{
$_GET = validater::filterParam($_GET, 'get');
$_COOKIE = validater::filterParam($_COOKIE, 'cookie');
if($this->config->framework->filterParam == 2)
{
$_GET = validater::filterParam($_GET, 'get');
$_COOKIE = validater::filterParam($_COOKIE, 'cookie');
}
}
/* 调用该方法 Call the method. */