remove unnecessary init.php.

This commit is contained in:
kj 2020-03-17 13:45:38 -04:00
parent cca5cb26ec
commit 23704b3fb6

View File

@ -1,28 +0,0 @@
<?php
$db = new mysqli(dbhost, dbuser, dbpass, dbname);
if ($db->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();
?>