simplephango/index.php
2023-07-03 01:11:10 +02:00

38 lines
646 B
PHP

<?php
use PhangoApp\PhaUtils\Utils;
include('libraries/Utils.php');
include('libraries/Routes.php');
spl_autoload_register(function ($class_name) {
//include($nombre_clase . '.php';
//echo $class_name;
switch($class_name) {
case 'PhangoApp\PDO\MySQL':
include('./libraries/PDO.php');
break;
}
});
if(is_file('vendor/autoload.php')) {
include('vendor/autoload.php');
}
ob_start();
Utils::load_config('config');
$path_info=isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '';
echo \PhangoApp\PhaRouter\get_route($path_info);
ob_end_flush();