index.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. if ('7.1.0' > phpversion()) {
  14. exit('您的php版本过低,不能安装本软件,兼容php版本7.1~7.4,谢谢!');
  15. }
  16. if (phpversion() >= '8.0.0') {
  17. exit('您的php版本太高,不能安装本软件,兼容php版本7.1~7.4,谢谢!');
  18. }
  19. define('DS', DIRECTORY_SEPARATOR);
  20. //检测是否已安装CRMEB系统
  21. if(file_exists("./install/") && !file_exists("./install.lock")){
  22. if($_SERVER['PHP_SELF'] != '/index.php'){
  23. header("Content-type: text/html; charset=utf-8");
  24. exit("请在域名根目录下安装,如:<br/> www.xxx.com/index.php 正确 <br/> www.xxx.com/www/index.php 错误,域名后面不能圈套目录, 但项目没有根目录存放限制,可以放在任意目录,apache虚拟主机配置一下即可");
  25. }
  26. header('Location:/install/index.php');
  27. exit();
  28. }
  29. require __DIR__ . '/../vendor/autoload.php';
  30. // 执行HTTP应用并响应
  31. $http = (new App())->http;
  32. $response = $http->run();
  33. $response->send();
  34. $http->end($response);