duckbrain/index.php
2024-10-29 19:12:25 -04:00

22 lines
450 B
PHP

<?php
require_once('config.php');
// Incluir clases
spl_autoload_register(function ($className) {
$fp = str_replace('\\','/',$className);
$name = basename($fp);
$dir = dirname($fp);
$file = ROOT_CORE.'/'.$dir.'/'.$name.'.php';
if (file_exists($file))
require_once $file;
});
// Incluir routers
$routers = glob(ROOT_CORE.'/Routers/*.php');
foreach($routers as $file)
require_once($file);
\Libs\Router::apply();
?>