index.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006-2016 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. header('Access-Control-Allow-Origin: *');
  13. header("Access-Control-Allow-Credentials: true");
  14. header("Access-Control-Allow-Methods: *");
  15. header("Access-Control-Allow-Headers: Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,X-Data-Type,X-Requested-With,X-TOKEN,TOKEN,device");
  16. header("Access-Control-Expose-Headers: *");
  17. ini_set('default_socket_timeout', -1);
  18. // 定义应用目录
  19. define('APP_PATH', __DIR__ . '/../application/');
  20. // +----------------------------------------------------------------------
  21. // | 平台自定义常量
  22. // +----------------------------------------------------------------------
  23. include_once 'constants.php';
  24. //加载各个不同环境的配置文件
  25. include_once 'constants/'.APP_STATUS.'.php';
  26. // 加载框架引导文件
  27. require __DIR__ . '/../thinkphp/start.php';