PHP Classes

File: app/Console/index.php

Recommend this page to a friend!
  Classes of Sergey Beskorovayniy   Silex MVC Blog   app/Console/index.php   Download  
File: app/Console/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Silex MVC Blog
MVC based blog using on the Silex micro-framework
Author: By
Last change:
Date: 8 years ago
Size: 557 bytes
 

Contents

Class file image Download
<?php
// app/console/index.php
try {

   
// Base path
   
if (!defined('BASEPATH')) {
       
define('BASEPATH', realpath(__DIR__ . '/../../'));
    }

   
// Set the path to library
   
set_include_path(implode(PATH_SEPARATOR, array(BASEPATH . '/library', get_include_path())));


   
//Set timezone
   
date_default_timezone_set("UTC");

   
// Run Bootstrap
   
require_once 'Bootstrap.php';

   
$bootstrap = new Bootstrap();

   
$bootstrap->run();
} catch (\
Exception $e) {
   
// catch and report any stray exceptions...
   
echo $e->getMessage();
}