mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 23:52:49 +08:00
修正Request类的create方法 修正Route类的check方法
This commit is contained in:
@@ -194,7 +194,7 @@ class Request
|
|||||||
$options['server'] = $server;
|
$options['server'] = $server;
|
||||||
$options['url'] = $server['REQUEST_URI'];
|
$options['url'] = $server['REQUEST_URI'];
|
||||||
$options['baseUrl'] = $info['path'];
|
$options['baseUrl'] = $info['path'];
|
||||||
$options['pathinfo'] = $info['path'];
|
$options['pathinfo'] = ltrim($info['path'],'/');
|
||||||
$options['method'] = $server['REQUEST_METHOD'];
|
$options['method'] = $server['REQUEST_METHOD'];
|
||||||
$options['domain'] = $server['HTTP_HOST'];
|
$options['domain'] = $server['HTTP_HOST'];
|
||||||
self::$instance = new self($options);
|
self::$instance = new self($options);
|
||||||
|
|||||||
@@ -695,7 +695,7 @@ class Route
|
|||||||
|
|
||||||
if (!empty($val['routes'])) {
|
if (!empty($val['routes'])) {
|
||||||
// 分组路由
|
// 分组路由
|
||||||
if ($pos = strpos($rule, ':') || $pos = strpos($rule, '<')) {
|
if (($pos = strpos($rule, ':')) || ($pos = strpos($rule, '<'))) {
|
||||||
$str = substr($rule, 0, $pos);
|
$str = substr($rule, 0, $pos);
|
||||||
} else {
|
} else {
|
||||||
$str = $rule;
|
$str = $rule;
|
||||||
|
|||||||
Reference in New Issue
Block a user