/
index.php
38 lines (31 loc) · 839 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
* / linux
* \ windows
*/
define("DS", DIRECTORY_SEPARATOR);
define("ROOT", realpath(dirname(__FILE__)) . DS);
define("APP_PATH", ROOT . "aplication" . DS);
//Imprimir ruta del proyecto
//echo ROOT;
require_once(APP_PATH . "Config.php");
require_once(APP_PATH . "Request.php");
require_once(APP_PATH . "Bootstrap.php");
require_once(APP_PATH . "Controller.php");
require_once(APP_PATH . "Model.php");
require_once(APP_PATH . "View.php");
require_once(APP_PATH . "Database.php");
require_once(APP_PATH . "Autoload.php");
//Comprobar que los archivos se estan cargando correctamente
//echo "<pre>";print_r(get_required_files());
/*
$r = new Request();
echo $r->getControlador()."<br>";
echo $r->getMetodo()."<pre>";
print_r($r->getArgs());
*/
try{
Bootstrap::run(new Request);
}catch(Exception $e){
echo $e->getMessage();
}