getConfig(); /** * Include Autoloader */ include APP_PATH . '/config/loader.php'; /** * Handle the request */ $application = new \Phalcon\Mvc\Application($di); //echo $application->handle($_SERVER['REQUEST_URI'])->getContent(); $request_uri=str_replace(["\n","\r","\t"], '', $_SERVER['HTTP_HOST']); if($request_uri=='localhost'){ $url=explode('/',$_SERVER['REQUEST_URI']); array_shift($url); array_shift($url); $url=implode('/',$url); $url='/'.$url; } else $url=$request_uri; echo $application->handle($url)->getContent(); } catch (\Exception $e) { echo $e->getMessage() . '
'; echo '
' . $e->getTraceAsString() . '
'; }