Skip to content

Commit

Permalink
调整URL剪切
Browse files Browse the repository at this point in the history
  • Loading branch information
dxkite committed Apr 26, 2017
1 parent d7088b9 commit 87fa2dd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ public static function urlPrefix(string $module, bool $admin, string $url)
$prefix=$prefix['simple'] ?? array_shift($prefix);
}
if ($admin) {
return substr($url, strlen('/'.$admin_prefix));
$url=substr($url, strlen('/'.$admin_prefix));
}
return substr($url, strlen('/'.$prefix));
$url=substr($url, strlen('/'.$prefix));
}
return $url;
return strlen($url)===0?'/':$url;
}


Expand Down

0 comments on commit 87fa2dd

Please sign in to comment.