1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- /**
- * 队列
- *
- *
- * 计划任务触发 by abc.com
- */
- define('BASE_ROOT_PATH',str_replace('/crontab','',dirname(__FILE__)));
- //define('BASE_ROOT_PATH',str_replace('/crontab','/',dirname(__FILE__)));
- echo BASE_ROOT_PATH . '\r\n';
- if (empty($_SERVER['argv'][1])) exit('Access Invalid!');
- define('APP_ID','crontab');
- define('BASE_PATH',str_replace('\\','/',dirname(__FILE__)));
- define('TRANS_MASTER',true);
- if (!@include(dirname(dirname(__FILE__)).'/global.php')) exit('global.php isn\'t exists!');
- if (!@include(BASE_CORE_PATH.'/33hao.php')) exit('33hao.php isn\'t exists!');
- //if (PHP_SAPI == 'cli') {
- if (php_sapi_name() == 'cli') {
- $_GET['act'] = $_SERVER['argv'][1];
- $_GET['op'] = empty($_SERVER['argv'][2]) ? 'index' : $_SERVER['argv'][2];
- }
- if (!@include(BASE_PATH.'/control/control.php')) exit('control.php isn\'t exists!');
- echo "act=" . $_GET['act'] . "\n";
- echo "act=" . $_GET['op'] . "\n";
- Base::run();
- ?>
|