index.php 844 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * 任务计划执行入口
  4. *
  5. *
  6. */
  7. define('InShopNC',true);
  8. // $_SERVER['argv'][1] = 'xs';
  9. // $_SERVER['argv'][2] = 'create';
  10. $_SERVER['argv'][1] = 'order';
  11. $_SERVER['argv'][2] = 'create_bill';
  12. if (empty($_SERVER['argv'][1]) || empty($_SERVER['argv'][2])) exit('parameter error');
  13. require(dirname(__FILE__).'/../../global.php');
  14. if (!@include(BASE_CORE_PATH.'/lrlz.php')) exit('lrlz.php isn\'t exists!');
  15. Base::init();
  16. $file_name = strtolower($_SERVER['argv'][1]);
  17. $method = $_SERVER['argv'][2].'Op';
  18. if (!@include(dirname(__FILE__).'/include/'.$file_name.'.php')) exit($file_name.'.php isn\'t exists!');
  19. $class_name = $file_name.'Control';
  20. $cron = new $class_name();
  21. if (method_exists($cron,$method)){
  22. $cron->$method();
  23. }else{
  24. exit('method '.$method.' isn\'t exists');
  25. }