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功能是没法用了, 是故意这么做的还是?
AI智能回复搜索中,请稍后...