From: Roland Häder Date: Wed, 30 Mar 2016 09:00:32 +0000 (+0200) Subject: Added base_path settings (which you normally don't need to touch) X-Git-Url: https://git.mxchange.org/?p=simple-upload.git;a=commitdiff_plain;h=7dc3f37a81184058663604c7cf27ea8acb510d05 Added base_path settings (which you normally don't need to touch) --- diff --git a/index.php b/index.php index 78e5ff4..61c6488 100644 --- a/index.php +++ b/index.php @@ -20,7 +20,10 @@ // Website title 'title' => 'strace.club', - // Directory to store uploaded files + // Base path (auto-detection) + 'base_path' => dirname(__FILE__) . DIRECTORY_SEPARATOR, + + // Directory to store uploaded files (relative to base_path) 'uploaddir' => '.', // Display list uploaded files @@ -100,7 +103,7 @@ $data['ignores'][] = basename($data['scriptname']); // Use canonized path - $data['uploaddir'] = realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . $settings['uploaddir']); + $data['uploaddir'] = realpath($settings['base_path'] . $settings['uploaddir']); // Maximum upload size, set by system $data['max_upload_size'] = ini_get('upload_max_filesize');