fix when owncloud is installed in the root of a server

This commit is contained in:
Robin 2010-05-21 19:50:18 +02:00
parent 78e54e1909
commit 086f060b9e
1 changed files with 2 additions and 1 deletions

View File

@ -37,9 +37,10 @@ $DOCUMENTROOT=$_SERVER['DOCUMENT_ROOT'];
$SERVERROOT=str_replace("\\",'/',$SERVERROOT);
$count=strlen($DOCUMENTROOT);
$WEBROOT=substr($SERVERROOT,$count);
if($WEBROOT{0}!=='/'){
if($WEBROOT{0}!=='/' and $WEBROOT!=''){
$WEBROOT='/'.$WEBROOT;
}
// $WEBROOT='http://localhost'.$WEBROOT;
// set the right include path
// set_include_path(get_include_path().PATH_SEPARATOR.$SERVERROOT.PATH_SEPARATOR.$SERVERROOT.'/inc'.PATH_SEPARATOR.$SERVERROOT.'/config');