반응형

출처 : http://fendee.egloos.com/7097191


삭제 방지용으로 내용 붙여 넣는다.


<form method="post" enctype="text/html" action="<%=Request.ServerVariables("SCRIPT_NAME")%>?t2=t2&t3=t3">
  <input type="text" name="t1" value="t1">
  <input type="text" name="t4" value="t4">
  <input type="submit" value="확인">
</form>

<br>전송방식 : <%=Request.ServerVariables ("REQUEST_METHOD")%>
<br>쿼리 스트링: <%=Request.ServerVariables ("QUERY_STRING")%>
<br>IP주소 : <%=Request.ServerVariables ("REMOTE_ADDR")%>
<br>브라우저 : <%=Request.ServerVariables ("HTTP_USER_AGENT")%>
<br>로그온ID : <%=Request.ServerVariables ("LOGON_USER")%>
<hr>
<br>서버 포트 : <%=Request.ServerVariables ("SERVER_PORT")%>
<br>웹 서버 : <%=Request.ServerVariables ("SERVER_SOFTWARE")%>

<hr>

출력결과:

전송방식 : POST 
쿼리 스트링: t2=t2&t3=t3 
IP주소 : 127.0.0.1 
브라우저 : Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727) 
로그온ID : 
--------------------------------------------------------------------------------
서버 포트 : 8080 
웹 서버 : Microsoft-IIS/5.1

--------------------------------------------------------------------------------

설명:
Request.ServerVariables("QUERY_STRING") 은 쿼리스트링으로(get) 넘어온 모든 값을 보여준다.
Request.ServerVariables("LOGON_USER") 는 윈도우 인증으로 로그인이 된 경우의 사용자 아이디를 보여준다.


반응형

+ Recent posts