diff --git a/config.inc.php b/config.inc.php index 684ca2d..1cfc1e9 100755 --- a/config.inc.php +++ b/config.inc.php @@ -9,7 +9,7 @@ ini_set('log_errors', 1); define('BASE_DIR', __DIR__.'/httpdocs'); -define('BASE_URI', dirname($_SERVER['PHP_SELF'])); +define('BASE_URI', rtrim(dirname($_SERVER['PHP_SELF']), '/')); define('TOOLS_DIR', BASE_DIR.'/tools'); define('TOOLS_URI', BASE_URI.'/tools'); diff --git a/httpdocs/index.php b/httpdocs/index.php index a705da1..ba45046 100755 --- a/httpdocs/index.php +++ b/httpdocs/index.php @@ -9,7 +9,7 @@ $tools = array_map( function ($item) { - return substr($item, strlen(BASE_DIR) + 1 /* trailing slash */); + return substr($item, strlen(BASE_DIR)); }, array_merge(glob(TOOLS_DIR.'/*', GLOB_ONLYDIR), glob(TOOLS_DIR.'/*.php')) );