X-Git-Url: https://git.bts.cx/cx.git/blobdiff_plain/27850f5b260560bdf75f3fca169ec5950ed00b22..ebc8e87c4a08bc35375a75642a068411c54a5fa3:/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);