diff --git a/framework/helper.class.php b/framework/helper.class.php index 91b97c975f..a513370784 100644 --- a/framework/helper.class.php +++ b/framework/helper.class.php @@ -530,5 +530,5 @@ function isLocalIP() */ function getWebRoot() { - return rtrim(str_replace('\\', '/', pathinfo($_SERVER['PHP_SELF'], PATHINFO_DIRNAME)), '/') . '/'; + return substr($_SERVER['SCRIPT_NAME'], 0, (strrpos($_SERVER['SCRIPT_NAME'], '/') + 1)); }