PHP Classes

File: public/index.php

Recommend this page to a friend!
  Classes of Sergey Beskorovayniy   Silex MVC Blog   public/index.php   Download  
File: public/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: 548 bytes
 

Contents

Class file image Download
<?php

// public/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");


    require_once
BASEPATH . '/app/Bootstrap.php';

   
$bootstrap = new Bootstrap();

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