diff --git a/config.inc.php b/config.inc.php index 1cfc1e9..c22d3f8 100755 --- a/config.inc.php +++ b/config.inc.php @@ -7,13 +7,12 @@ ini_set('display_errors', 1); ini_set('log_errors', 1); +umask(0); + +require_once __DIR__.'/vendor/autoload.php'; define('BASE_DIR', __DIR__.'/httpdocs'); define('BASE_URI', rtrim(dirname($_SERVER['PHP_SELF']), '/')); define('TOOLS_DIR', BASE_DIR.'/tools'); define('TOOLS_URI', BASE_URI.'/tools'); - -umask(0); - -require_once __DIR__.'/vendor/autoload.php'; diff --git a/httpdocs/index.php b/httpdocs/index.php index ba45046..48e4218 100755 --- a/httpdocs/index.php +++ b/httpdocs/index.php @@ -9,7 +9,7 @@ $tools = array_map( function ($item) { - return substr($item, strlen(BASE_DIR)); + return BASE_URI.substr($item, strlen(BASE_DIR)); }, array_merge(glob(TOOLS_DIR.'/*', GLOB_ONLYDIR), glob(TOOLS_DIR.'/*.php')) );