-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.php
36 lines (26 loc) · 851 Bytes
/
config.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
<?php
error_reporting(E_ERROR | E_PARSE);
class Config {
public static $aOptions = [];
public static function fnLoad()
{
static::$aOptions = json_decode(file_get_contents("./config.json"), true) ?: [];
}
public static function fnSave()
{
file_put_contents("./config.json", json_encode(static::$aOptions));
}
}
Config::fnLoad();
$sBase = Config::$aOptions["base"];
$sBA = $sBase."/static/app";
$sB = $sBase."/static/app/jquery-easyui-1.10.2";
define('ROOT_PATH', __DIR__);
define('DATA_PATH', __DIR__."/data");
define('DATA_FILES_PATH', __DIR__."/data/files");
define('DATA_PHP_FILE_PATH', __DIR__."/data/files/js");
define('DATA_JS_FILES_PATH', __DIR__."/data/files/php");
include_once("./lib.php");
include_once("./rb.php");
include_once("./models/files.php");
include_once("./models/tags.php");