-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
60 lines (54 loc) · 1.57 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
49
50
51
52
53
54
55
56
57
58
59
<?php
/**
* 入口文件
* Some rights reserved:www.thinkcmf.com
*/
if (ini_get('magic_quotes_gpc')) {
function stripslashesRecursive(array $array){
foreach ($array as $k => $v) {
if (is_string($v)){
$array[$k] = stripslashes($v);
} else if (is_array($v)){
$array[$k] = stripslashesRecursive($v);
}
}
return $array;
}
$_GET = stripslashesRecursive($_GET);
$_POST = stripslashesRecursive($_POST);
}
//开启调试模式
define("APP_DEBUG", true);
//网站当前路径
define('SITE_PATH', dirname(__FILE__)."/");
//项目路径,不可更改
define('APP_PATH', SITE_PATH . 'application/');
//项目相对路径,不可更改
define('SPAPP_PATH', SITE_PATH.'simplewind/');
//
define('SPAPP', './application/');
//项目资源目录,不可更改
define('SPSTATIC', SITE_PATH.'statics/');
//定义缓存存放路径
define("RUNTIME_PATH", SITE_PATH . "data/runtime/");
//静态缓存目录
define("HTML_PATH", SITE_PATH . "data/runtime/Html/");
//版本号
define("SIMPLEWIND_CMF_VERSION", 'X2.1.0');
define("THINKCMF_CORE_TAGLIBS", 'cx,Common\Lib\Taglib\TagLibSpadmin,Common\Lib\Taglib\TagLibHome');
if(function_exists('saeAutoLoader') || isset($_SERVER['HTTP_BAE_ENV_APPID'])){
}else{
if(!file_exists("data/install.lock")){
if(strtolower($_GET['g'])!="install"){
header("Location:./index.php?g=install");
exit();
}
}
}
//uc client root
define("UC_CLIENT_ROOT", './api/uc_client/');
if(file_exists(UC_CLIENT_ROOT."config.inc.php")){
include UC_CLIENT_ROOT."config.inc.php";
}
//载入框架核心文件
require SPAPP_PATH.'Core/ThinkPHP.php';