Esempio n. 1
0
 /**
  * 根据 uri 重新设置一些相关的环境变量
  */
 public static function VResetEnv($sUri)
 {
     list($sn, $qs, $pi) = self::AParseUri($sUri);
     parse_str($qs, $arr);
     $GLOBALS['_GET'] = $_GET = $arr;
     $GLOBALS['_REQUEST'] = $_REQUEST = $_REQUEST + $arr;
     $GLOBALS['_SERVER']['QUERY_STRING'] = $_SERVER['QUERY_STRING'] = $GLOBALS['_ENV']['QUERY_STRING'] = $_ENV['QUERY_STRING'] = $qs;
     $GLOBALS['_SERVER']['PHP_SELF'] = $_SERVER['PHP_SELF'] = $GLOBALS['_SERVER']['SCRIPT_NAME'] = $_SERVER['SCRIPT_NAME'] = $GLOBALS['_ENV']['PHP_SELF'] = $_ENV['PHP_SELF'] = $GLOBALS['_ENV']['SCRIPT_NAME'] = $_ENV['SCRIPT_NAME'] = $sn;
     $GLOBALS['_SERVER']['SCRIPT_FILENAME'] = $_SERVER['SCRIPT_FILENAME'] = $GLOBALS['_ENV']['SCRIPT_FILENAME'] = $_ENV['SCRIPT_FILENAME'] = Ko_Web_Request::SDocumentRoot() . $sn;
     $GLOBALS['_SERVER']['PATH_INFO'] = $_SERVER['PATH_INFO'] = $GLOBALS['_ENV']['PATH_INFO'] = $_ENV['PATH_INFO'] = $pi;
 }