PHP Classes

File: server.php

Recommend this page to a friend!
  Classes of Slawomir Kaleta   Dframe Demo   server.php   Download  
File: server.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Dframe Demo
Application to demonstrate the Dframe framework
Author: By
Last change: Resolved #26, Dframe 4.1 update
Resolved #26, Dframe 4.1 update
Date: 3 years ago
Size: 453 bytes
 

Contents

Class file image Download
<?php

/**
 * DframeFramework
 * Copyright (c) S?awomir Kaleta
 *
 * @author S?awomir Kaleta <slaszka@gmail.com>
 * @license https://github.com/dframe/dframe/blob/master/LICENCE (MIT)
 */

/**
 * Usage:
 * php -S localhost:8080 -t web/ server.php
 */

$uri = urldecode(
   
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
);

if (
$uri !== '/' and file_exists(__DIR__ . '/web' . $uri)) {
    return
false;
}

require_once
__DIR__ . '/web/index.php';