index.php 936 B

12345678910111213141516171819202122232425262728
  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. if (empty($_SERVER['argv'][1]) || empty($_SERVER['argv'][2])) exit('parameter error');
  12. $_GET['act'] = $_SERVER['argv'][1];
  13. $_GET['op'] = $_SERVER['argv'][2];
  14. if (!@include(BASE_PATH . '/control/control.php')) exit('control.php isn\'t exists!');
  15. function work_proc() {
  16. Base::run();
  17. }
  18. //work_proc();
  19. //for demaon 进程
  20. event\util::fork_workerex('work_proc',10);