Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (25 sloc) 902 Bytes
<?php
error_reporting(E_ALL);
use Phalcon\Mvc\Application;
use Phalcon\Config\Adapter\Ini as ConfigIni;
try {
define('APP_PATH', realpath('..') . '/');
/**
* Read the configuration
*/
$config = new ConfigIni(APP_PATH . 'app/config/config.ini');
if (is_readable(APP_PATH . 'app/config/config.ini.dev')) {
$override = new ConfigIni(APP_PATH . 'app/config/config.ini.dev');
$config->merge($override);
}
/**
* Auto-loader configuration
*/
require APP_PATH . 'app/config/loader.php';
$application = new Application(new Services($config));
// NGINX - PHP-FPM already set PATH_INFO variable to handle route
echo $application->handle(!empty($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : null)->getContent();
} catch (Exception $e){
echo $e->getMessage() . '<br>';
echo '<pre>' . $e->getTraceAsString() . '</pre>';
}
You can’t perform that action at this time.