VZPJjIQwNu.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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();