mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-06-02 22:12:16 +02:00
Set custom config file path
This commit is contained in:
parent
5f69cbf1d6
commit
28336bfc36
|
@ -10,7 +10,7 @@ or
|
|||
-Put inside this file all the static configuration you want and forgot to configure "tinyfilemanager.php".
|
||||
#################################################################################################################
|
||||
*/
|
||||
$fm_base_path = '/browse';
|
||||
$fm_base_path = '';
|
||||
|
||||
// Auth with login/password
|
||||
// set true/false to enable/disable it
|
||||
|
@ -51,11 +51,11 @@ $default_timezone = 'Etc/UTC'; // UTC
|
|||
|
||||
// Root path for file manager
|
||||
// use absolute path of directory i.e: '/var/www/folder' or $_SERVER['DOCUMENT_ROOT'].'/folder'
|
||||
$root_path = $_SERVER['DOCUMENT_ROOT'] . '/sites/default/files/public';
|
||||
$root_path = $_SERVER['DOCUMENT_ROOT'];
|
||||
|
||||
// Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder'
|
||||
// Will not working if $root_path will be outside of server document root
|
||||
$root_url = $GLOBALS['root_url'] = 'sites/default/files/public';
|
||||
$root_url = $GLOBALS['root_url'] = '';
|
||||
|
||||
// Server hostname. Can set manually if wrong
|
||||
$http_host = $_SERVER['HTTP_HOST'];
|
||||
|
|
|
@ -133,14 +133,17 @@ $ip_blacklist = array(
|
|||
'::' // non-routable meta ipv6
|
||||
);
|
||||
|
||||
// if User has the customized config file, try to use it to override the default config above
|
||||
$config_file = './config.php';
|
||||
// Sharif.
|
||||
$config_file = dirname(__FILE__) . '/config.php';
|
||||
// if customized config file path set, try to use it to override the default config above
|
||||
if (isset($GLOBALS['fm_config_dir']) && is_readable($GLOBALS['fm_config_dir'])) {
|
||||
$config_file = $GLOBALS['fm_config_dir'];
|
||||
}
|
||||
// if customized config file, try to use it to override the default config above
|
||||
else {
|
||||
$config_file = dirname(__FILE__) . '/config.php';
|
||||
}
|
||||
if (is_readable($config_file)) {
|
||||
@include($config_file);
|
||||
}
|
||||
|
||||
define('FM_BASE_PATH', ($fm_base_path) ? $fm_base_path : $_SERVER['PHP_SELF']);
|
||||
|
||||
// --- EDIT BELOW CAREFULLY OR DO NOT EDIT AT ALL ---
|
||||
|
|
Loading…
Reference in a new issue