index.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: liu21st <liu21st@gmail.com>
  10. // +----------------------------------------------------------------------
  11. // [ 应用入口文件 ]
  12. namespace think;
  13. define('DS', DIRECTORY_SEPARATOR);
  14. //检测是否已安装CRMEB系统
  15. if (file_exists("./install/") && !file_exists("./install/install.lock")) {
  16. if ($_SERVER['PHP_SELF'] != '/index.php') {
  17. header("Content-type: text/html; charset=utf-8");
  18. exit("请在域名根目录下安装,如:<br/> www.xxx.com/index.php 正确 <br/> www.xxx.com/www/index.php 错误,域名后面不能圈套目录, 但项目没有根目录存放限制,可以放在任意目录,apache虚拟主机配置一下即可");
  19. }
  20. header('Location:/install/index.php');
  21. exit();
  22. }
  23. require __DIR__ . '/../vendor/autoload.php';
  24. // 执行HTTP应用并响应
  25. $http = (new App())->http;
  26. $response = $http->run();
  27. $response->send();
  28. $http->end($response);