From: dj3c1t Date: Mon, 25 Nov 2013 20:58:25 +0000 (+0100) Subject: bug REQUEST_URI X-Git-Tag: mtweb.0.11.5 X-Git-Url: http://git.dj3c1t.com/?p=mtweb;a=commitdiff_plain;h=0ae18f679eb3e0293b07986585a10bd3e65dcc9f bug REQUEST_URI --- diff --git a/mw/mw_app.php b/mw/mw_app.php index 4355487..4b0b2eb 100644 --- a/mw/mw_app.php +++ b/mw/mw_app.php @@ -60,10 +60,11 @@ } function init_pathes(){ - if(($n = strpos($_SERVER["REQUEST_URI"], "?")) !== false){ - $_SERVER["REQUEST_URI"] = substr($_SERVER["REQUEST_URI"], 0, $n); + $REQUEST_URI = $_SERVER["REQUEST_URI"]; + if(($n = strpos($REQUEST_URI, "?")) !== false){ + $REQUEST_URI = substr($REQUEST_URI, 0, $n); } - $web_path = explode("/", preg_replace('#/+#','/',$_SERVER["REQUEST_URI"])); + $web_path = explode("/", preg_replace('#/+#','/',$REQUEST_URI)); $this->pathes["web"] = ""; for($i = 0; $i < count($web_path) - 1; $i++) $this->pathes["web"] .= $web_path[$i]."/"; if(