diff --git a/xhprof_lib/display/xhprof.php b/xhprof_lib/display/xhprof.php index 4be67bc8..99a40e1a 100644 --- a/xhprof_lib/display/xhprof.php +++ b/xhprof_lib/display/xhprof.php @@ -40,9 +40,9 @@ /** * Our coding convention disallows relative paths in hrefs. - * Get the base URL path from the SCRIPT_NAME. + * Get the base URL path from the REQUEST_URI. */ -$base_path = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/\\'); +$base_path = rtrim(dirname($_SERVER['REQUEST_URI']), '/\\'); /** @@ -58,7 +58,7 @@ function xhprof_include_js_css($ui_dir_url_path = null) { if (empty($ui_dir_url_path)) { - $ui_dir_url_path = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/\\'); + $ui_dir_url_path = rtrim(dirname($_SERVER['REQUEST_URI']), '/\\'); } // style sheets