-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
47 lines (34 loc) · 1.13 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
<?php
/**
* Kirby CMS index file
* This file is located in the main directory of a Kirby site
* and loads the roots.php if available as well as the kirby/system.php
*
* @package Kirby CMS
*/
// get the current directory
$root = dirname(__FILE__);
// root file
$rootfile = $root . DIRECTORY_SEPARATOR . 'roots.php';
// check for a custom roots file
if(file_exists($rootfile)) {
// load the custom roots file
include($rootfile);
} else {
// system-independent shortcut for /
define('DS', DIRECTORY_SEPARATOR);
// location of the index.php / public document root
define('KIRBY_INDEX_ROOT', $root);
// location of the kirby system
define('KIRBY_CMS_ROOT', KIRBY_INDEX_ROOT . DS . 'kirby');
// location of all site specific files / site folder
define('KIRBY_PROJECT_ROOT', KIRBY_INDEX_ROOT . DS . 'site');
// location of the content folder
define('KIRBY_CONTENT_ROOT', KIRBY_INDEX_ROOT . DS . 'content');
}
// system starter file
$system = KIRBY_CMS_ROOT . DS . 'system.php';
// check if the system file exists
if(!file_exists($system)) die('The Kirby system could not be loaded');
// load the system
include($system);