File: public/index.php

Recommend this page to a friend!
  Classes of Fabrice Fesch  >  Melis PHP Platform Skeleton  >  public/index.php  >  Download  
File: public/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Melis PHP Platform Skeleton
Setup a site to run using the Melis platform
Author: By
Last change:
Date: 1 year ago
Size: 650 bytes
 

Contents

Class file image Download
<?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';

// Warning message handler
require 'warning-handler.php';

// define('HTTP_ROOT', dirname(__DIR__) . '/public/');

// var_dump(HTTP_ROOT); die();
// Run the application!
Zend\Mvc\Application::init(require 'config/application.config.php')->run();

For more information send a message to info at phpclasses dot org.