diff options
author | Imbasaur <yarrusg@gmail.com> | 2016-04-29 15:20:48 +0200 |
---|---|---|
committer | Imbasaur <yarrusg@gmail.com> | 2016-04-29 15:20:48 +0200 |
commit | 7459bc1c40af72441ccdaff944ef2dc9465ba9bf (patch) | |
tree | fea088cdda93079aee9e719a1bbe8464358efbb0 /app/common.php | |
parent | 99f275e5bb033cca33eee87b0e914645730f13d1 (diff) | |
parent | 81a25cbe6328eab7c4de0befc64186610ecc7f49 (diff) |
Merge pull request #2 from fguillot/master
merge
Diffstat (limited to 'app/common.php')
-rw-r--r-- | app/common.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/common.php b/app/common.php index da624844..aed07a50 100644 --- a/app/common.php +++ b/app/common.php @@ -14,12 +14,16 @@ if (getenv('DATABASE_URL')) { define('DB_NAME', ltrim($dbopts["path"], '/')); } -if (file_exists('config.php')) { - require 'config.php'; +$config_file = implode(DIRECTORY_SEPARATOR, array(__DIR__, '..', 'config.php')); + +if (file_exists($config_file)) { + require $config_file; } -if (file_exists('data'.DIRECTORY_SEPARATOR.'config.php')) { - require 'data'.DIRECTORY_SEPARATOR.'config.php'; +$config_file = implode(DIRECTORY_SEPARATOR, array(__DIR__, '..', 'data', 'config.php')); + +if (file_exists($config_file)) { + require $config_file; } require __DIR__.'/constants.php'; |