]> git.bts.cx Git - cx.git/blobdiff - public/index.php
coding css blocks
[cx.git] / public / index.php
index 79e00a43956d03ab6442fca926f54dbc779a0135..61216a874def0f6ff2a34d19e872975b978e9f28 100644 (file)
@@ -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);
 require_once($main_file);
 cx($db_file, $data_folder, $public_data_folder);