-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
24 lines (19 loc) · 869 Bytes
/
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
<?php
define('PHILE_VERSION', '0.9.2');
define('ROOT_DIR', realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR);
define('CONTENT_DIR', ROOT_DIR . 'content' . DIRECTORY_SEPARATOR);
define('CONTENT_EXT', '.md');
define('LIB_DIR', ROOT_DIR . 'lib' . DIRECTORY_SEPARATOR);
define('PLUGINS_DIR', ROOT_DIR . 'plugins' . DIRECTORY_SEPARATOR);
define('THEMES_DIR', ROOT_DIR . 'themes' . DIRECTORY_SEPARATOR);
define('CACHE_DIR', LIB_DIR . 'cache' . DIRECTORY_SEPARATOR);
spl_autoload_extensions(".php");
spl_autoload_register(function ($className) {
$fileName = LIB_DIR . str_replace("\\", DIRECTORY_SEPARATOR, $className) . '.php';
if (file_exists($fileName)) {
require_once $fileName;
}
});
require(ROOT_DIR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php');
$phileCore = new \Phile\Core();
echo $phileCore->render();