-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
33 lines (30 loc) · 1.31 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
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <[email protected]>
// +----------------------------------------------------------------------
// [ 应用入口文件 ]
// 检测是否是新安装
if(file_exists("./install") && !file_exists("./install/install.lock"))
{
// 组装安装url
$url=$_SERVER['HTTP_HOST'].trim($_SERVER['SCRIPT_NAME'],'index.php').'install/index.php';
// 使用http://域名方式访问;避免./Public/install 路径方式的兼容性和其他出错问题
header("Location:http://$url");
die;
}
// 定义应用程序所在目录
define('APP_WORK_DIR', '/kbug/');
// 定义应用目录
define('APP_PATH', __DIR__ . '/kbug/');
// 定义命名空间
define('APP_NAMESPACE','kbug');
// 定义模板目录
define('TEMPLATE_PATH', __DIR__ . '/templates/');
// 加载框架引导文件
require __DIR__ . '/library/kernel/thinkphp/start.php';