thinkphp-wechat/public/admin.php
Wenbin.Wang d49c9fde59 代码
2021-12-24 16:40:05 +08:00

32 lines
775 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// [ 应用入口文件 ]
namespace think;
// [ PHP版本检查 ]
header("Content-type: text/html; charset=utf-8");
if (version_compare(PHP_VERSION, '5.6', '<')) {
die('PHP版本过低最少需要PHP5.6请升级PHP版本');
}
// [ 应用入口文件 ]
// 定义应用目录
define('APP_PATH', __DIR__ . '/../application/');
// 定义入口为admin
define('ENTRANCE', 'admin');
// 加载基础文件
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();
}