Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define('BASE_DIR', dirname(__DIR__));
- define('APP_DIR', BASE_DIR . '/app');
- $config_file = '/vagrant/site/app/config/config.php';
- define('APP_ENV', 'dev');
- define('APP_PROJECT', 'xxxx.yyyy');
- define('APP_URL', 'xxxx.yyyy');
- define('DEV_ADD_TRACE_TO_ERRORS', true);
- ini_set('display_errors', 1);
- error_reporting(E_ALL);
- try {
- /**
- * Read the configuration
- */
- require_once($config_file);
- /**
- * Read auto-loader
- */
- include __DIR__ . "/../app/config/loader.php";
- /**
- * Read services
- */
- include __DIR__ . "/../app/config/services.php";
- /**
- * Handle the request
- */
- $application = new Phalcon\Mvc\Application($di);
- echo $application->handle()->getContent();
- } catch (Exception $e) {
- if (APP_ENV == 'dev') {
- echo $e->getMessage(), '<br>';
- echo nl2br(htmlentities($e->getTraceAsString()));
- error_log('#f344f5s ' . $e->getMessage() . ' |||| ' . $e->getTraceAsString());
- } else {
- error_log('#esite5a4d ' . $e->getMessage() . ' |||| ' . $e->getTraceAsString());
- mail('removed_for_public', 'ERROR @ xxxx.yy', $e->getMessage() . ' ||| ' . $e->getTraceAsString());
- $response = new Phalcon\Http\Response();
- $response->setStatusCode(404, "Not Found");
- $response->setContent("Page not found.");
- $response->send();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement