index.php 747 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. Log::record(__FILE__ . " 1",Log::DEBUG);
  3. if (empty($_SERVER['argv'][1])) exit('Access Invalid!');
  4. Log::record(__FILE__ . " 2",Log::DEBUG);
  5. define('APP_ID','crontab');
  6. define('BASE_PATH',str_replace('\\','/',dirname(__FILE__)));
  7. define('TRANS_MASTER',true);
  8. Log::record(__FILE__ . " 3",Log::DEBUG);
  9. if (php_sapi_name() == 'cli') {
  10. $_GET['act'] = $_SERVER['argv'][1];
  11. $_GET['op'] = empty($_SERVER['argv'][2]) ? 'index' : $_SERVER['argv'][2];
  12. }
  13. Log::record(__FILE__ . " 4",Log::DEBUG);
  14. if (!@include(BASE_PATH.'/control/control.php')) exit('control.php isn\'t exists!');
  15. Log::record(__FILE__ . " 5",Log::DEBUG);
  16. echo "act=" . $_GET['act'] . "\n";
  17. echo "act=" . $_GET['op'] . "\n";
  18. Base::run();