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