projects
/
simple-upload.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
145a7ae
)
Added base_path settings (which you normally don't need to touch)
author
Roland Häder
<roland@mxchange.org>
Wed, 30 Mar 2016 09:00:32 +0000
(11:00 +0200)
committer
Roland Häder
<roland@mxchange.org>
Wed, 30 Mar 2016 09:00:32 +0000
(11:00 +0200)
index.php
patch
|
blob
|
history
diff --git
a/index.php
b/index.php
index 78e5ff4f63882054d89fed80fa2b0c2909a280fc..61c6488e36feee6746f2da70b0cbb8daf90169fe 100644
(file)
--- a/
index.php
+++ b/
index.php
@@
-20,7
+20,10
@@
// Website title
'title' => 'strace.club',
// 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
'uploaddir' => '.',
// Display list uploaded files
@@
-100,7
+103,7
@@
$data['ignores'][] = basename($data['scriptname']);
// Use canonized path
$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');
// Maximum upload size, set by system
$data['max_upload_size'] = ini_get('upload_max_filesize');