index.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. // 使用此文件可以达到隐藏admin模块的效果
  13. // 为了你的安全,强烈不建议将此文件名修改成admin.php
  14. // 定义应用目录
  15. define('APP_PATH', __DIR__ . '/../application/');
  16. // 判断是否安装
  17. if (!is_file(APP_PATH . 'admin/command/Install/install.lock')) {
  18. header("location:./install.php");
  19. exit;
  20. }
  21. // 加载框架引导文件
  22. require __DIR__ . '/../thinkphp/base.php';
  23. // 绑定到admin模块
  24. \think\Route::bind('admin');
  25. // 关闭路由
  26. \think\App::route(false);
  27. // 设置根url
  28. \think\Url::root('');
  29. // 执行应用
  30. \think\App::run()->send();
  31. //// +----------------------------------------------------------------------
  32. //// | ThinkPHP [ WE CAN DO IT JUST THINK ]
  33. //// +----------------------------------------------------------------------
  34. //// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
  35. //// +----------------------------------------------------------------------
  36. //// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  37. //// +----------------------------------------------------------------------
  38. //// | Author: liu21st <liu21st@gmail.com>
  39. //// +----------------------------------------------------------------------
  40. //// [ 应用入口文件 ]
  41. //// 定义应用目录
  42. //define('APP_PATH', __DIR__ . '/../application/');
  43. //
  44. //// 判断是否安装
  45. //if (!is_file(APP_PATH . 'admin/command/Install/install.lock')) {
  46. // header("location:./install.php");
  47. // exit;
  48. //}
  49. //
  50. //// 加载框架引导文件
  51. //require __DIR__ . '/../thinkphp/start.php';