index.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006-2019 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. require __DIR__ . '/../vendor/autoload.php';
  14. define('EXTEND_APP_PATH', __DIR__ . '/../extend/');
  15. // 声明全局变量
  16. define('DS', DIRECTORY_SEPARATOR);
  17. define('ROOT_PATH', __DIR__ . DS . '..' . DS);
  18. // 判断是否安装程序
  19. //if (!is_file(ROOT_PATH . 'config' . DS . 'install' . DS . 'lock' . DS . 'install.lock')) {
  20. // exit(header("location:/install.php"));
  21. //}
  22. //$msg = '['.date("Y-m-d H:i:s").']'.'日志内容aa:'.date('Y-m-d H:i:s');
  23. //$rootpath = ROOT_PATH.DS.'runtime'. DS .'sr_logs'. DS;
  24. //$path = $rootpath.date("Ymd").'.txt';
  25. //file_put_contents($path, $msg.PHP_EOL,FILE_APPEND);
  26. // 执行HTTP应用并响应
  27. $http = (new App())->http;
  28. $response = $http->run();
  29. $response->send();
  30. $http->end($response);