PHP Classes

File: app/app.php

Recommend this page to a friend!
  Classes of Pierre-Henry Soria   Minimalist PHP Sales Site   app/app.php   Download  
File: app/app.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Minimalist PHP Sales Site
Implement a sales site from configuration files
Author: By
Last change:
Date: 4 months ago
Size: 350 bytes
 

Contents

Class file image Download
<?php
/**
 * (c) Pierre-Henry Soria <hi@ph7.me>
 * MIT License - https://opensource.org/licenses/MIT
 */

namespace PHenry\App;

use
HttpException;

try {
    require
__DIR__ . '/routes.php';
} catch (
HttpException $e) {
   
header(sprintf('HTTP/1.1 %s %s', $e->getCode(), $e->getMessage()));
    require
__DIR__ . '/pages/404.page.php';
    exit;
}