From 23704b3fb6185f97c266c93f7fb5e343f0369022 Mon Sep 17 00:00:00 2001 From: kj Date: Tue, 17 Mar 2020 13:45:38 -0400 Subject: [PATCH] remove unnecessary init.php. --- src/init.php | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 src/init.php diff --git a/src/init.php b/src/init.php deleted file mode 100644 index 918cc3e..0000000 --- a/src/init.php +++ /dev/null @@ -1,28 +0,0 @@ -connect_errno){ - exit('No se ha podido conectar a la base de datos.'); -} - -// Incluir clases -spl_autoload_register(function ($className) { - $fp = str_replace('\\','/',$className); - $name = basename($fp); - $dir = dirname($fp); - $file = ROOT_DIR.'/src/'.$dir.'/'.$name.'.php'; - if (file_exists($file)) { - require_once $file; - return; - } -}); - -// Incluir routers -$routers = glob(ROOT_DIR.'/src/Routers/*.php'); - -foreach($routers as $file){ - require_once($file); -} - -\Libs\Router::apply(); -?>