diff --git a/core/Application.php b/core/Application.php index 0e35bb7..b9c1e04 100644 --- a/core/Application.php +++ b/core/Application.php @@ -13,11 +13,11 @@ class Application public File $file; public DB $db; public static Application $app; - public function __construct($rootPath) + public function __construct() { $dotenv = Dotenv::createImmutable(dirname(__DIR__)); $dotenv->load(); - self::$ROOT_DIR = dirname($rootPath); + self::$ROOT_DIR = dirname(__DIR__); self::$app = $this; $this->request = new Request(); $this->response = new Response(); diff --git a/public/index.php b/public/index.php index 5e83c57..bff5ed6 100644 --- a/public/index.php +++ b/public/index.php @@ -3,7 +3,7 @@ use app\core\Application; require_once __DIR__ . "/../vendor/autoload.php"; -$app = new Application(__DIR__); +$app = new Application(); $router = $app->router; //Routes $router->post('/api', 'Api');