watcher.php 739 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of Hyperf.
  5. *
  6. * @link https://www.hyperf.io
  7. * @document https://hyperf.wiki
  8. * @contact group@hyperf.io
  9. * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
  10. */
  11. putenv('SCAN_CACHEABLE=(true)');
  12. $dir = dirname(__DIR__, 2);
  13. $cwd = getcwd();
  14. switch (true) {
  15. case file_exists($dir . '/bin/hyperf.php'):
  16. require_once $dir . '/bin/hyperf.php';
  17. break;
  18. case file_exists($dir . '/../bin/hyperf.php'):
  19. require_once $dir . '/../bin/hyperf.php';
  20. break;
  21. case file_exists($cwd . '/bin/hyperf.php'):
  22. require_once $cwd . '/bin/hyperf.php';
  23. break;
  24. default:
  25. require_once 'bin/hyperf.php';
  26. break;
  27. }