diff --git a/application/core/Config.php b/application/core/Config.php index 0968243..5f16b65 100644 --- a/application/core/Config.php +++ b/application/core/Config.php @@ -2,14 +2,13 @@ class Config { - // this is public to allow better Unit Testing public static $config; public static function get($key) { if (!self::$config) { - $config_file = '../application/config/config.' . Environment::get() . '.php'; + $config_file = __DIR__ . '/../config/config.' . Environment::get() . '.php'; if (!file_exists($config_file)) { return false; diff --git a/public/index.php b/public/index.php index fc3bc9b..5db82cc 100644 --- a/public/index.php +++ b/public/index.php @@ -11,7 +11,7 @@ // auto-loading the classes (currently only from application/libs) via Composer's PSR-4 auto-loader // later it might be useful to use a namespace here, but for now let's keep it as simple as possible -require '../vendor/autoload.php'; +require __DIR__ . '/../vendor/autoload.php'; // start our application new Application(); diff --git a/public/router.php b/public/router.php new file mode 100644 index 0000000..d3f78fe --- /dev/null +++ b/public/router.php @@ -0,0 +1,11 @@ +