PHP Classes

File: web/index.php

Recommend this page to a friend!
  Classes of Pierre-Henry Soria   pH7 PHP Web App Boilerplate   web/index.php   Download  
File: web/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: pH7 PHP Web App Boilerplate
Start a Web app development using boilerplate code
Author: By
Last change:
Date: 1 year ago
Size: 401 bytes
 

Contents

Class file image Download
<?php

namespace PH7\Boilerplate;

use
Silex\Application;

require
dirname(__DIR__) . '/vendor/autoload.php';

$app = new Application();

$app['env'] = !empty($_ENV['env']) ? 'dev' : 'prod'; // phpunit.xml will set it to true
require dirname(__DIR__) . '/app/config/' . $app['env'] . '.php';
require
dirname(__DIR__) . '/app/bootstrap.php';
require
dirname(__DIR__) . '/app/routes.php';

$app->run();