修正Request类的create方法 修正Route类的check方法

This commit is contained in:
thinkphp
2016-06-14 15:33:49 +08:00
parent 5e7c8e9902
commit 00517f9125
2 changed files with 2 additions and 2 deletions

View File

@@ -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);

View File

@@ -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;