forked from jandaryl/simple-php-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
27 lines (20 loc) · 935 Bytes
/
index.php
File metadata and controls
27 lines (20 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
require_once 'app/backend/core/Init.php';
define('BACKEND_CONTROLLER', 'app/backend/controllers/');
define('APP_VENDOR', 'app/vendor/');
define('FRONTEND_BASE', 'app/frontend/');
define('FRONTEND_PAGE', 'app/frontend/pages/');
define('FRONTEND_INCLUDE', 'app/frontend/includes/');
define('FRONTEND_TEMPLATE', 'app/frontend/templates/');
define('FRONTEND_INCLUDE_ERROR', 'app/frontend/includes/errors/');
define('FRONTEND_ASSET', 'app/frontend/assets/');
$indexation = ""; // De base les pages sont indexées par les moteurs de recherche. cf la fonction nestpasadmin
require_once 'app/backend/core/Router.php';
require_once 'app/backend/init/routes.php';
$router->addGlobalVariable('indexation', $indexation);
$router->addGlobalVariable('user', $user);
// Traiter la requête en fonction de l'URL
$requestUrl = parse_url($_SERVER['REQUEST_URI']);
$requestPath = $requestUrl['path'];
$router->handleRequest($requestPath);
?>