X-Git-Url: https://git.bts.cx/cx.git/blobdiff_plain/6e68608aecb6a542b9c75a13afd5002aeb7bc0f1..85fe5bf672260a88151fa02d1d6d224762edd6a2:/public/index.php diff --git a/public/index.php b/public/index.php index 79e00a4..61216a8 100644 --- a/public/index.php +++ b/public/index.php @@ -9,9 +9,16 @@ `---' */ -$main_file = join(DIRECTORY_SEPARATOR, array(__DIR__, "..", "cx", "cx.php")); -$db_file = join(DIRECTORY_SEPARATOR, array(__DIR__, "..", "db", "btscx.db")); -$data_folder = join(DIRECTORY_SEPARATOR, array(__DIR__, "..", "data")); -$public_data_folder = join(DIRECTORY_SEPARATOR, array(__DIR__, "data")); +define('CX_PHP_VERSION', '8.0.0'); + +if (version_compare(phpversion(), CX_PHP_VERSION) < 0) { + echo('Requires PHP version ' . CX_PHP_VERSION . ' or later'); + exit; +} + +$main_file = join(DIRECTORY_SEPARATOR, array(__DIR__, '..', 'cx', 'cx.php')); +$db_file = join(DIRECTORY_SEPARATOR, array(__DIR__, '..', 'db', 'btscx.db')); +$data_folder = join(DIRECTORY_SEPARATOR, array(__DIR__, '..', 'data')); +$public_data_folder = join(DIRECTORY_SEPARATOR, array(__DIR__, 'data')); require_once($main_file); cx($db_file, $data_folder, $public_data_folder);