From 0ae18f679eb3e0293b07986585a10bd3e65dcc9f Mon Sep 17 00:00:00 2001 From: dj3c1t Date: Mon, 25 Nov 2013 21:58:25 +0100 Subject: [PATCH] bug REQUEST_URI --- mw/mw_app.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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( -- 2.1.4