AppService.php 463 B

12345678910111213141516171819202122232425
  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. header("Location:/install.php");
  15. exit();
  16. }
  17. }
  18. public function boot()
  19. {
  20. // 服务启动
  21. }
  22. }