<?php
namespace think;

// 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false
define('APP_DEBUG', false);

define('DS', DIRECTORY_SEPARATOR);

// 定义根目录
define('ROOT_PATH', __DIR__);

// 定义应用目录
define('APP_PATH', ROOT_PATH);
define('APP_PATH2', '/');
// 安装包目录

define('INSTALL_PATH', APP_PATH . 'install' . DS);

define('ADMIN_HTTP_HOST', 'http://'.$_SERVER['HTTP_HOST']);
// 定义应用目录
define('IMGROOT', ADMIN_HTTP_HOST);
define('ROOT', ADMIN_HTTP_HOST);
define('APIROOT', '/');
define('IMGPATH',str_replace('\\','/',dirname(__FILE__)) . '/');
define('ATTACHMENT', IMGPATH.'uploads/image/');
define('IMGROOT2', '/uploads/image/');
define ('RUNTIME_PATH',ROOT_PATH.'/../runtime/');
define('CACHE_PATH', RUNTIME_PATH . 'cache' . DS);//缓存地址 cache

// 判断是否安装了项目
if (!is_file(APP_PATH . '/../application/install/install.lock')) {
    header("location:".ADMIN_HTTP_HOST."/install.php");
    exit;
}

// 加载基础文件
require __DIR__ . '/../thinkphp/base.php';


// 支持事先使用静态方法设置Request对象和Config对象

// 执行应用并响应
Container::get('app')->run()->send();


