header('location:http://a.lrlz.com:8000'.request_helper::req_uri(),false,302); } } } function init_request() { request_helper::fill_server(); request_helper::fill_param(); //request_helper::url_jump(); } class local_request { private $script_file; private $query_string; private $method; public function __construct($uri) { $param = parse_url($uri); $this->script_file = BASE_ROOT_PATH . $param['path']; $this->query_string = $param['query']; $this->method = 'GET'; } public function script_file() { return $this->script_file; } public function query_string() { return $this->query_string; } public function method() { return $this->method; } } function init_localreq(local_request $req) { $squery = $req->query_string(); $params = preg_split('/&|=/', $squery); $method = strtolower($req->method()); if ($method == 'get' || $method == 'post') { for ($i = 0; $i < count($params); ++$i) { $key = $params[$i]; $val = $params[++$i]; $_GET[$key] = $val; $_POST[$key] = $val; } } }