From 3f971f6ad230f86c9c05ae2b5d5d7de3ae20c009 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Sat, 23 Dec 2017 03:34:40 +0900 Subject: [PATCH] Update index.php --- index.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index b4d74ee..fd66167 100644 --- a/index.php +++ b/index.php @@ -8,9 +8,14 @@ // including vendor autoloader include_once('./vendor/autoload.php'); -// system files -include_once('./system/config.php'); -include_once('./system/database.php'); +// load system files +$load_systems = array('config', 'database', 'uri'); +foreach($load_systems as $system_name) { + $system_inc_file = './system/' . $system_name . '.php'; + if(file_exists($system_inc_file)) { + include_once($system_inc_file); + } +} // route controller $route = '';