ZwiiCMS/index.php
2023-02-08 19:51:00 +01:00

60 lines
1.3 KiB
PHP

<?php
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2023, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.fr/
*/
/**
* Initialisation de Zwii
*/
// Remplace la directive htaccess
ini_set('session.use_trans_sid', FALSE);
// Démarre la session
session_start();
/**
* Vérification de la version de PHP
*/
if(version_compare(PHP_VERSION, '7.2.0', '<') ) {
exit('PHP 7.2+ mini required');
}
if ( version_compare(PHP_VERSION, '8.1.999', '>') ) {
exit('PHP 8.2 not yet supported, install PHP 7.n or PHP 8.1.n');
}
/*
*Localisation
* Locales :
* french : free.fr
* fr_FR : XAMPP Macos
* fr_FR.utf8 : la majorité
*/
date_default_timezone_set('Europe/Paris');
setlocale (LC_ALL,'french','fr_Fr','fr_FR.utf8');
/**
* Chargement des classes
*/
require 'core/class/autoload.php';
autoload::autoloader();
/**
* Chargement du coeur
*/
require 'core/core.php';
$core = new core;
spl_autoload_register('core::autoload');
echo $core->router();