index.php 794 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * 队列
  4. *
  5. *
  6. * 计划任务触发 by abc.com
  7. */
  8. if (empty($_SERVER['argv'][1])) exit('Access Invalid!');
  9. define('APP_ID','crontab');
  10. define('BASE_PATH',str_replace('\\','/',dirname(__FILE__)));
  11. define('TRANS_MASTER',true);
  12. //if (!@include(dirname(dirname(__FILE__)).'/global.php')) exit('global.php isn\'t exists!');
  13. //if (!@include(BASE_CORE_PATH.'/33hao.php')) exit('33hao.php isn\'t exists!');
  14. //if (PHP_SAPI == 'cli') {
  15. if (php_sapi_name() == 'cli') {
  16. $_GET['act'] = $_SERVER['argv'][1];
  17. $_GET['op'] = empty($_SERVER['argv'][2]) ? 'index' : $_SERVER['argv'][2];
  18. }
  19. if (!@include(BASE_PATH.'/control/control.php')) exit('control.php isn\'t exists!');
  20. echo "act=" . $_GET['act'] . "\n";
  21. echo "act=" . $_GET['op'] . "\n";
  22. Base::run();
  23. ?>