index.php 1004 B

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