run.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <?php
  2. define('InShopNC',true);
  3. $str = NULL;
  4. $y = '';
  5. if(isset($str)) {
  6. $x = 0;
  7. }
  8. if(empty($str)) {
  9. $x = 1;
  10. }
  11. if($str == NULL) {
  12. $x = 2;
  13. }
  14. if(isset($y)) {
  15. $x = 0;
  16. }
  17. if(empty($y)) {
  18. $x = 1;
  19. }
  20. if($y == NULL) {
  21. $x = 2;
  22. }
  23. $file = "/mobile/index.php";
  24. $ops = explode("?",$file);
  25. $squery = $ops[1];
  26. $params = preg_split('/&|=/', $squery);
  27. for ($i = 0; $i < count($params); ++$i) {
  28. $key = $params[$i];
  29. $val = $params[++$i];
  30. $_GET[$key] = $val;
  31. $_POST[$key] = $val;
  32. }
  33. $ret = array('jsObj' => NULL,'jsArray' => array());
  34. unset($ret['xxx']);
  35. $ret = json_encode($ret);
  36. define('BASE_ROOT_PATH',str_replace('\\','/',dirname(__FILE__)));
  37. echo BASE_ROOT_PATH."\n";
  38. require_once (BASE_ROOT_PATH . '/fooder.php');
  39. echo $argv;
  40. function help_out()
  41. {
  42. echo "fetch_goods:start fetch goods.\r\n";
  43. echo "fillgcid:start fill all goods class id.\r\n";
  44. echo "checkgoods:check all goods class id.\r\n";
  45. }
  46. $time = -microtime();
  47. //$hash = 0;
  48. //for ($i=0; $i < rand(1000,4000); ++$i) {
  49. // $hash ^= md5(substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, rand(1,10)));
  50. //}
  51. $time += microtime();
  52. $y = sprintf('%f', $time);
  53. $y = strtotime('2016-12-12 01:01:01');
  54. $y = urldecode('%E4%B8%AD%E9%80%9A%E5%BF%AB%E9%80%92');
  55. $x=new date();
  56. define('StartTime', microtime(true));
  57. define('TIMESTAMP', time());
  58. if(count($argv) == 1) {
  59. return;
  60. }
  61. $gfcgi_run = 1;
  62. if($gfcgi_run == 0) { //模拟请求
  63. $file = BASE_ROOT_PATH . '/debug_run.php';
  64. include $file;
  65. Base::mobile_init();
  66. Base::mobile_control();
  67. } elseif ($gfcgi_run == 1) {
  68. $file = BASE_ROOT_PATH . '/research/research_run.php';
  69. include $file;
  70. } else {
  71. Base::run_util();
  72. $file = BASE_CRONTAB_PATH . '/crawl/fetch_goods.php';
  73. require $file;
  74. }
  75. ?>