PHP Classes

File: web/index.php

Recommend this page to a friend!
  Classes of Rafael Espinosa   Silex Enhanced   web/index.php   Download  
File: web/index.php
Role: Application script
Content type: text/plain
Description: Application script
Class: Silex Enhanced
Silex with custom services providers.
Author: By
Last change: Initialized repository with application skeleton and demo files.
Date: 9 years ago
Size: 677 bytes
 

Contents

Class file image Download
<?php
/**
 * PHP version ~5.5
 *
 * @category FrontController
 * @package Application
 * @author Rafael Ernesto Espinosa Santiesteban <ralphlnx@gmail.com>
 * @license MIT <http://www.opensource.org/licenses/mit-license.php>
 * @link http://fluency.inc.com
 */

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

// Runtime Environment
if (isset($_SERVER['ENVIRONMENT'])) {
   
define('ENVIRONMENT', strtolower($_SERVER['ENVIRONMENT']));
} else {
   
define('ENVIRONMENT', 'prod');
}

$environment = ENVIRONMENT;

if (
$environment == 'prod') {
    include_once
'app.php';
} else {
    include_once
"app_{$environment}.php";
}