X-Git-Url: https://git.bts.cx/cx.git/blobdiff_plain/6e68608aecb6a542b9c75a13afd5002aeb7bc0f1..9a60ead9e861fcb9c8fb252e4b27aa36d28b7954:/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);