Пример #1
0
<?php

error_reporting(E_ALL);
ini_set('display_errors', 1);
use app\Config;
use Phalcon\Mvc\Application;
use Phalcon\Loader;
try {
    $loader = new Loader();
    $loader->registerNamespaces(['app' => '../app/'])->register();
    $config = new Config();
    $config->setDispatcher();
    $config->setVoltTemplates();
    $config->setView();
    $config->setSecur();
    $config->setCrypt();
    $config->setCoockie();
    $config->setSession();
    $config->setRoute();
    $config->setSqlite('/www/generatorNew/db/db.sqlite');
    $application = new Application($config);
    echo $application->handle()->getContent();
} catch (Exception $e) {
    echo "PhalconException: ", $e->getMessage();
}