文件位置 \system\core\uri.php
if ($_SERVER['REQUEST_URI'])
{
if (isset($_SERVER['HTTP_X_REWRITE_URL']))
{
$request_main = $_SERVER['HTTP_X_REWRITE_URL'];
}
else
{
$request_main = $_SERVER['REQUEST_URI'];
}
$requests = explode($this->index_script, $request_main);
if (count($requests) == 1 AND dirname($_SERVER['SCRIPT_NAME']) != '/')
{
$request_main = preg_replace('/^' . preg_quote(dirname($_SERVER['SCRIPT_NAME']), '/') . '/i', '', $request_main);
}
else if (count($requests) == 2)
{
if ($requests[0] != '/')
{
$request_main = str_replace($requests[0], '', $request_main);
}
$request_main = str_replace($this->index_script, '', $request_main);
}
}
else if ($_SERVER['QUERY_STRING'])
{
$request_main = $_SERVER['QUERY_STRING'];
}
56行到85行 $_SERVER['REQUEST_URI'] 这个条件已经满足了就不会往elseif 里面走了吧? 那么在什么情况下$_SERVER['REQUEST_URI']为空呢? 这么下去$_SERVER['QUERY_STRING'] 这个完全没有用吧? nginx的rewrite功能是没法用了, 是故意这么做的还是?
阅读全文
收起全文