index.php 903 B

1234567891011121314151617181920212223242526
  1. <?php
  2. declare(strict_types=0);
  3. define('APP_ID', 'queue');
  4. defined('BASE_ROOT_PATH') or define('BASE_ROOT_PATH',str_replace('/queue','',dirname(__FILE__)));
  5. defined('BASE_PATH') or define('BASE_PATH',BASE_ROOT_PATH . '/queue');
  6. if (!@include(dirname(dirname(__FILE__)) . '/global.php')) exit('global.php isn\'t exists!');
  7. if (!@include(BASE_CORE_PATH . '/lrlz.php')) exit('lrlz.php isn\'t exists!');
  8. require_once(BASE_ROOT_PATH . '/fooder.php');
  9. require_once(BASE_ROOT_PATH . '/helper/event_looper.php');
  10. if (empty($_SERVER['argv'][1]) || empty($_SERVER['argv'][2])) exit('parameter error');
  11. $_GET['act'] = $_SERVER['argv'][1];
  12. $_GET['op'] = $_SERVER['argv'][2];
  13. if (!@include(BASE_PATH . '/control/control.php')) exit('control.php isn\'t exists!');
  14. function work_proc() {
  15. Base::run();
  16. }
  17. //work_proc();
  18. //for demaon 进程
  19. event\util::fork_workerex('work_proc',10);