Skip to content

Instantly share code, notes, and snippets.

@ppeiris
Created November 13, 2013 17:48
Show Gist options
  • Save ppeiris/7453280 to your computer and use it in GitHub Desktop.
Save ppeiris/7453280 to your computer and use it in GitHub Desktop.
updated zf2 index.php file to include the development.config.php modules
<?php
/**
* This makes our life easier when dealing with paths. Everything is relative
* to the application root now.
*/
chdir(dirname(__DIR__));
// Decline static file requests back to the PHP built-in webserver
if (php_sapi_name() === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) {
return false;
}
// Setup autoloading
require 'init_autoloader.php';
$ApplicationConfig = require 'config/application.config.php';
if (file_exists('config/development.config.php')) {
$ApplicationConfig = Zend\Stdlib\ArrayUtils::merge($ApplicationConfig, require 'config/development.config.php');
}
// Run the application!
Zend\Mvc\Application::init($ApplicationConfig)->run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment