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; } } }