X-Git-Url: https://git.bts.cx/cx.git/blobdiff_plain/6e68608aecb6a542b9c75a13afd5002aeb7bc0f1..d4ec97e97b01a12a8fdf6d473b05e6c496842e85:/public/index.php?ds=inline 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);