AppService.php 506 B

123456789101112131415161718192021222324252627
  1. <?php
  2. declare (strict_types=1);
  3. namespace app;
  4. use think\Service;
  5. /**
  6. * 应用服务类
  7. */
  8. class AppService extends Service
  9. {
  10. public function register()
  11. {
  12. // 服务注册
  13. if (!file_exists(public_path() . '/installed.lock')) {//如果没有安装的就提示安装
  14. //如果是/installApp开头的路径一律放行
  15. header('Location:/install.php');
  16. exit();
  17. }
  18. }
  19. public function boot()
  20. {
  21. }
  22. }