Skip to content

Commit

Permalink
精简逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
tourze committed Sep 8, 2015
1 parent 7ee1d44 commit 112da14
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Helper/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ class Url extends HelperBase implements HelperInterface
*/
public static function detectUri()
{
if ( ! empty($_SERVER['PATH_INFO']))
{
$uri = $_SERVER['PATH_INFO'];
}
else
// 如果PATH_INFO读不到,那么就从其他途径读
if ( ! $uri = Arr::get($_SERVER, 'PATH_INFO'))
{
// REQUEST_URI和PHP_SELF会包含当前脚本路径
if (isset($_SERVER['REQUEST_URI']))
Expand Down

0 comments on commit 112da14

Please sign in to comment.