Skip to content

Instantly share code, notes, and snippets.

@nclundsten
Created April 17, 2013 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nclundsten/5408030 to your computer and use it in GitHub Desktop.
Save nclundsten/5408030 to your computer and use it in GitHub Desktop.
<?php
/**
* This makes our life easier when dealing with paths. Everything is relative
* to the application root now.
*/
chdir(dirname(__DIR__));
// Setup autoloading
include 'init_autoloader.php';
$config = include 'config/application.config.php';
$host = $_SERVER['HTTP_HOST'];
$file = 'config/' . $host . '.modules.php';
if (file_exists($file)) {
$config = \Zend\Stdlib\ArrayUtils::merge($config, include $file);
}
// Run the application!
Zend\Mvc\Application::init($config)->run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment