index.php 1.1 KB

123456789101112131415161718192021222324252627282930
  1. <?php declare(strict_types=0);
  2. if (empty($_SERVER['argv'][1])) exit('Access Invalid!');
  3. defined('APP_ID') or define('APP_ID','crontab');
  4. define('MOBILE_SERVER',true);
  5. defined('BASE_ROOT_PATH') or define('BASE_ROOT_PATH',str_replace('/crontab','',dirname(__FILE__)));
  6. defined('BASE_PATH') or define('BASE_PATH',BASE_ROOT_PATH . '/crontab');
  7. require_once(BASE_ROOT_PATH . '/global.php');
  8. require_once(BASE_ROOT_PATH . '/fooder.php');
  9. require_once(BASE_CORE_PATH . '/lrlz.php');
  10. require_once(BASE_ROOT_PATH . '/helper/http_header.php');
  11. require_once(BASE_ROOT_PATH . '/helper/session.php');
  12. require_once(BASE_ROOT_PATH . '/helper/img_helper.php');
  13. require_once(BASE_ROOT_PATH . '/helper/exceptionex.php');
  14. require_once(BASE_ROOT_PATH . '/helper/notify_helper.php');
  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();