index.php 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006-2015 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. //跨域请求设置
  13. header('Access-Control-Allow-Origin:*');
  14. header('Access-Control-Allow-Credentials:true');
  15. header('Access-Control-Allow-Methods:*');
  16. header('Access-Control-Allow-Headers:Origin,X-Requested-With, Content-Type, Accept, x-access-sign, x-access-time, uid,Access-Control-Allow-Credentials,Access-Token,access-token,token,access-control-allow-origin,Token,Access-Control-Allow-Origin,Content-Type,Referer,User-Agent');
  17. // 定义应用目录
  18. define('APP_PATH', __DIR__ . '/../application/');
  19. // 定义上传目录
  20. define('UPLOAD_PATH', __DIR__ . '/../public');
  21. // 定义应用缓存目录
  22. define('RUNTIME_PATH', __DIR__ . '/../runtime/');
  23. // 开启调试模式
  24. define('APP_DEBUG', true);
  25. // 加载框架引导文件
  26. require __DIR__ . '/../thinkphp/start.php';