WEBD-325-45/week-03/project/administrator/index.php

36 lines
1.1 KiB
PHP
Raw Normal View History

<?php
/**
2022-04-12 19:41:51 +00:00
* @package Octoleo CMS
*
2022-04-12 19:41:51 +00:00
* @created 3rd April 2022
* @author Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
* @git WEBD-325-45 <https://git.vdm.dev/Llewellyn/WEBD-325-45>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// NOTE: This file should remain compatible with PHP 5.2 to allow us to run our PHP minimum check and show a friendly error message
2022-04-12 19:41:51 +00:00
// source: https://github.com/joomla/joomla-cms/blob/4.1-dev/index.php#L9
2022-04-12 19:41:51 +00:00
// Define the application's minimum supported PHP version as a constant, so it can be referenced within the application.
define('OCTOLEO_MINIMUM_PHP', '7.2.5');
2022-04-12 19:41:51 +00:00
if (version_compare(PHP_VERSION, OCTOLEO_MINIMUM_PHP, '<'))
{
die(
2022-04-12 19:41:51 +00:00
str_replace(
'{{phpversion}}',
OCTOLEO_MINIMUM_PHP,
file_get_contents(dirname(__FILE__) . '/../templates/system/incompatible.html')
)
);
}
/**
* Constant that is checked in included files to prevent direct access.
*/
2022-04-12 19:41:51 +00:00
define('_LEXEC', 1);
2022-04-12 19:41:51 +00:00
// We must setup some house rules, since we can't have all
// this code just doing what it wants can we.... <<eWɘ>>yn growling
require_once dirname(__FILE__) . '/includes/app.php';