Add initial project structure and configurations
- Set up project directories including app structure. - Add IntelliJ IDEA project files and configurations. - Implement basic PHP router for request handling. - Provide reference files for features, IPs, and documentation. - Include license and copyright files.
This commit is contained in:
35
public/index.php
Normal file
35
public/index.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (c) 2025. Brusegan Samuele, Davanzo Andrea
|
||||
* Questo file fa parte di VeyonCtrl ed è rilasciato
|
||||
* sotto la licenza MIT. Vedere il file LICENSE per i dettagli.
|
||||
*/
|
||||
|
||||
// Definisci il percorso base dell'applicazione
|
||||
|
||||
define( 'BASE_PATH', dirname( __DIR__ ) );
|
||||
session_start();
|
||||
const URL_PATH = "https://project16.test";
|
||||
const COMMON_HTML_HEAD = BASE_PATH . '/public/commons/head.php';
|
||||
const COMMON_HTML_FOOT = BASE_PATH . '/public/commons/bottom_navigation.php';
|
||||
|
||||
const THEME = ( 0 ) ? 'light' : 'dark';
|
||||
|
||||
// Includi i file necessari, a mano o con l'autoloader di Composer
|
||||
require_once BASE_PATH . '/Router.php';
|
||||
require_once BASE_PATH . '/public/functions.php';
|
||||
// require_once BASE_PATH . '/public/commons/php/session_wall.php';
|
||||
require_once BASE_PATH . '/app/controllers/Controller.php';
|
||||
|
||||
// checkSessionExpiration();
|
||||
|
||||
// Inizializza il router
|
||||
$router = new Router();
|
||||
|
||||
// Definisci le rotte
|
||||
require BASE_PATH . '/public/routes.php';
|
||||
|
||||
// Ottieni l'URL richiesto e fai partire il router
|
||||
$url = $_SERVER[ 'REQUEST_URI' ];
|
||||
$router->dispatch( $url );
|
||||
|
||||
Reference in New Issue
Block a user