-
-
Notifications
You must be signed in to change notification settings - Fork 574
/
index.php
executable file
·48 lines (40 loc) · 1.64 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/**
* @title Index
* @desc Index file for public root.
*
* @author HiZup, Ltd <contact@hizup.net>
* @author Pierre-Henry Soria <hello@ph7cms.com>
* @copyright (c) 2014-2017, HiZup, Ltd. All Rights Reserved.
* @copyright (c) 2012-2017, Pierre-Henry Soria. All Rights Reserved.
* @license See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
* @link http://hizup.uk
* @link http://ph7cms.com
* @package PH7 / ROOT / Core
*/
namespace PH7;
define('PH7', 1);
define('PH7_REQUIRE_SERVER_VERSION', '5.5.0');
define('PH7_REQUIRE_SQL_VERSION', '5.0');
if (version_compare(PHP_VERSION, PH7_REQUIRE_SERVER_VERSION, '<')) {
exit('ERROR: Your current PHP version is ' . PHP_VERSION . '. pH7CMS requires PHP ' . PH7_REQUIRE_SERVER_VERSION . ' or newer.<br /> Please ask your Web host to upgrade PHP to ' . PH7_REQUIRE_SERVER_VERSION . ' or newer.');
}
// If no settings found, go to the installer
if (!is_file(__DIR__ . '/_constants.php')) {
if (is_dir(__DIR__ . '/_install/')) {
// Clear redirection cache since some folks get it cached
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Expires: Thu, 01 Jan 1970 00:00:00 GMT');
header('Location: _install/');
} else {
echo 'CONFIG FILE NOT FOUND! If you want to make a new installation, please re-upload _install/ folder and clear your database.';
}
exit;
}
require __DIR__ . '/_constants.php';
require PH7_PATH_APP . 'Bootstrap.php';
$oApp = Bootstrap::getInstance();
$oApp->setTimezoneIfNotSet();
ob_start();
$oApp->run();
ob_end_flush();