Skip to content

Commit

Permalink
修改路由bug
Browse files Browse the repository at this point in the history
  • Loading branch information
woann committed Dec 12, 2018
1 parent 22e31d4 commit cd6dbcb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 5 additions & 2 deletions frame/Lib/Router.php
Expand Up @@ -51,8 +51,11 @@ public function http($request_uri){
return ['m'=>$module ,'c'=>$controller,'a'=>$action,'p'=>$param];
}
//去掉uri左边的"/"
// $path = trim($request_uri, '/');
$path = $request_uri;
if ($request_uri != '/') {
$path = trim($request_uri, '/');
}else{
$path = $request_uri;
}
if(!empty( self::$config['ext']) &&substr($path,-strlen(self::$config['ext'])) == self::$config['ext'] ){
$path = substr($path , 0 , strlen($path)-strlen(self::$config['ext']));
}
Expand Down
1 change: 0 additions & 1 deletion runtime/light.pid

This file was deleted.

0 comments on commit cd6dbcb

Please sign in to comment.