index.php 974 B

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