start.php 554 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * run with command
  4. * php start.php start
  5. */
  6. ini_set('display_errors', 'on');
  7. use Workerman\Worker;
  8. if(!extension_loaded('pcntl'))
  9. {
  10. exit("Please install pcntl extension. See http://doc3.workerman.net/install/install.html\n");
  11. }
  12. if(!extension_loaded('posix'))
  13. {
  14. exit("Please install posix extension. See http://doc3.workerman.net/install/install.html\n");
  15. }
  16. require_once __DIR__ . '/Workerman/Autoloader.php';
  17. foreach(glob(__DIR__.'/Applications/*/start.php') as $start_file)
  18. {
  19. require_once $start_file;
  20. }
  21. Worker::runAll();