Ver Mensaje Individual
  #4 (permalink)  
Antiguo 27/04/2016, 09:52
seravifer
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Problema con enrutado

Solución:
Código PHP:
<?php
define
('APP_PATH''/app');
require_once 
__DIR__ '/vendor/autoload.php';
$request KleinRequest::createFromGlobals();
$request->server()->set('REQUEST_URI'substr($_SERVER['REQUEST_URI'],  strlen(APP_PATH)));
$klein = new KleinKlein();

$klein->respond('GET''/hello', function () {
    include 
'hello.php';
});

$klein->dispatch($request);