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