* code for task#978.

This commit is contained in:
zhujinyong
2012-12-11 07:39:36 +00:00
parent 50bb37bd31
commit 32ff8ff4a6

View File

@@ -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));
}