summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--index.php28
-rw-r--r--system/bootstrap.php11
2 files changed, 21 insertions, 18 deletions
diff --git a/index.php b/index.php
index 0dc1212..ac82810 100644
--- a/index.php
+++ b/index.php
@@ -1,14 +1,14 @@
-<?php
-
-/**
- * Working directory
- */
-define('ROOTDIR',dirname(__FILE__));
-
-/**
- * Bootstrap the system
- */
-require_once('system/bootstrap.php');
-Bootstrap::run();
-Request::create()->execute()->send_headers()->send_body();
-
+<?php
+
+/**
+ * Working directory
+ */
+define('ROOTDIR',dirname(__FILE__).'/');
+
+/**
+ * Bootstrap the system
+ */
+require_once('system/bootstrap.php');
+Bootstrap::run();
+Request::create()->execute()->send_headers()->send_body();
+
diff --git a/system/bootstrap.php b/system/bootstrap.php
index 181fda7..3e43dc5 100644
--- a/system/bootstrap.php
+++ b/system/bootstrap.php
@@ -38,22 +38,22 @@ class Bootstrap{
/**
* Application folder
*/
- define('APPDIR', ROOTDIR.'/application/');
+ define('APPDIR', ROOTDIR.'application/');
/**
* Modules folder
*/
- define('MODDIR', ROOTDIR.'/modules/');
+ define('MODDIR', ROOTDIR.'modules/');
/**
* System folder
*/
- define('SYSDIR', ROOTDIR.'/system/');
+ define('SYSDIR', ROOTDIR.'system/');
/**
* Web folder
*/
- define('WEBDIR', ROOTDIR.'/web/');
+ define('WEBDIR', ROOTDIR.'web/');
/**
* Helper functions
*/
@@ -67,6 +67,9 @@ class Bootstrap{
Config::load_group('core', 'application/config/core.php');
spl_autoload_register('Bootstrap::autoload');
Debug::init();
+ if(Config::get('core.composer',false))
+ include ROOTDIR.'vendor/autoload.php';
+
foreach(Config::get('core.routes') as $route)
Route::add($route[0],$route[1],$route[2]);
}