2020-05-27 18:46:16 +02:00
|
|
|
<?php
|
|
|
|
|
2021-05-14 17:59:35 +00:00
|
|
|
use Config\Paths;
|
|
|
|
|
2020-05-27 18:46:16 +02:00
|
|
|
// Valid PHP Version?
|
2021-05-20 17:13:13 +00:00
|
|
|
$minPHPVersionId = 80000; // 8.0
|
|
|
|
if ($minPHPVersionId > PHP_VERSION_ID) {
|
2020-06-10 15:00:12 +00:00
|
|
|
die(
|
2021-05-20 17:13:13 +00:00
|
|
|
'Your PHP version must be 8.0 or higher to run Castopod Host. Current version: ' .
|
2021-04-02 17:20:02 +00:00
|
|
|
PHP_VERSION
|
2020-06-10 15:00:12 +00:00
|
|
|
);
|
2020-05-27 18:46:16 +02:00
|
|
|
}
|
|
|
|
unset($minPHPVersion);
|
|
|
|
|
|
|
|
// Path to the front controller (this file)
|
|
|
|
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);
|
|
|
|
|
|
|
|
/*
|
|
|
|
*---------------------------------------------------------------
|
|
|
|
* BOOTSTRAP THE APPLICATION
|
|
|
|
*---------------------------------------------------------------
|
|
|
|
* This process sets up the path constants, loads and registers
|
|
|
|
* our autoloader, along with Composer's, loads our constants
|
|
|
|
* and fires up an environment-specific bootstrapping.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Ensure the current directory is pointing to the front controller's directory
|
|
|
|
chdir(__DIR__);
|
|
|
|
|
|
|
|
// Load our paths config file
|
2021-04-02 17:20:02 +00:00
|
|
|
// This is the line that might need to be changed, depending on your folder structure.
|
|
|
|
require realpath(FCPATH . '../app/Config/Paths.php') ?:
|
|
|
|
FCPATH . '../app/Config/Paths.php';
|
|
|
|
// ^^^ Change this if you move your application folder
|
|
|
|
|
2021-05-14 17:59:35 +00:00
|
|
|
$paths = new Paths();
|
2020-05-27 18:46:16 +02:00
|
|
|
|
|
|
|
// Location of the framework bootstrap file.
|
2021-04-02 17:20:02 +00:00
|
|
|
$bootstrap =
|
|
|
|
rtrim($paths->systemDirectory, '\\/ ') .
|
|
|
|
DIRECTORY_SEPARATOR .
|
|
|
|
'bootstrap.php';
|
|
|
|
$app = require realpath($bootstrap) ?: $bootstrap;
|
2020-05-27 18:46:16 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
*---------------------------------------------------------------
|
|
|
|
* LAUNCH THE APPLICATION
|
|
|
|
*---------------------------------------------------------------
|
|
|
|
* Now that everything is setup, it's time to actually fire
|
|
|
|
* up the engines and make this app do its thang.
|
|
|
|
*/
|
|
|
|
$app->run();
|