ringfinger/api/v1/index.php

16 lines
372 B
PHP

<?php
require '../../data/classes/core/Autoloader.php';
$autoloader = new Autoloader('../../data/cache/');
$session = new Session();
$router = new Router($_SERVER['REQUEST_URI'], $_SERVER['REQUEST_METHOD']);
if (isset($_SERVER['HTTP_CONTENT_TYPE'])) {
$router->setRequestBody($_SERVER['HTTP_CONTENT_TYPE'], file_get_contents('php://input'));
}
$router->route();