-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
34 lines (28 loc) · 1.12 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
<?php
// +----------------------------------------------------------------------
// | 海豚PHP框架 [ DolphinPHP ]
// +----------------------------------------------------------------------
// | 版权所有 2016~2019 广东卓锐软件有限公司 [ http://www.zrthink.com ]
// +----------------------------------------------------------------------
// | 官方网站: http://dolphinphp.com
// +----------------------------------------------------------------------
// [ 应用入口文件 ]
namespace think;
// [ PHP版本检查 ]
header("Content-type: text/html; charset=utf-8");
if (version_compare(PHP_VERSION, '5.6', '<')) {
die('PHP版本过低,最少需要PHP5.6,请升级PHP版本!');
}
// 定义后台入口文件
define('ADMIN_FILE', 'admin.php');
// 加载基础文件
require __DIR__ . '/../thinkphp/base.php';
// 支持事先使用静态方法设置Request对象和Config对象
// 检查是否安装
if(!is_file('../data/install.lock')){
define('BIND_MODULE', 'install');
Container::get('app')->bind('install')->run()->send();
} else {
// 执行应用并响应
Container::get('app')->run()->send();
}