PHP Classes

File: webapp/index.php

Recommend this page to a friend!
  Classes of Oleg Lunegov   MicroPHP Framework   webapp/index.php   Download  
File: webapp/index.php
Role: Example script
Content type: text/plain
Description: Application script
Class: MicroPHP Framework
MVC framework for Web or command line applications
Author: By
Last change: Update of webapp/index.php
Date: 9 months ago
Size: 461 bytes
 

Contents

Class file image Download
<?php

// Run system and get app
require __DIR__ . '/../app/__autoload.php';
require
__DIR__ . '/../app/Kernel.php';

// Get kernel
$kernel = new \App\Kernel('debug', false);
$request = \Zend\Diactoros\ServerRequestFactory::fromGlobals($_SERVER, $_GET, $_POST, $_COOKIE, $_FILES);

$app = new \Micro\Mvc\MvcApplication($kernel);

// Run framework
$response = $app->run($request);

// Send response
$app->send($response);

// Kill application
$app->terminate();