wxapp.php 765 B

12345678910111213141516171819202122232425
  1. <?php
  2. if (version_compare(PHP_VERSION, '5.3.0', '<')) {
  3. die('require PHP > 5.3.0 !');
  4. }
  5. header("Content-Type:text/html; charset=utf-8");
  6. define('APP_DEBUG', true);
  7. define('BIND_MODULE', 'Home');
  8. define('APP_PATH', './Modules/');
  9. $wx_controller = $_REQUEST['controller'];
  10. $wx_controller_arr = explode('.', $wx_controller);
  11. if (!isset($wx_controller_arr[1])) {
  12. $wx_controller_arr[1] = 'index';
  13. }
  14. unset($_GET['i']);
  15. unset($_GET['t']);
  16. unset($_GET['v']);
  17. unset($_GET['from']);
  18. unset($_GET['do']);
  19. $_GET['c'] = $wx_controller_arr[0];
  20. $_GET['a'] = $wx_controller_arr[1];
  21. unset($_GET['controller']);
  22. unset($_GET['m']);
  23. define('ROOT_PATH', str_replace('\\', '/', dirname(CCAFDBBFAED)) . '/');
  24. define('RUNTIME_PATH', './Runtime/');
  25. require './ThinkPHP/ThinkPHP.php';