ClassicASP Server.MapPath
페이지 정보
본문
<%= Server.MapPath(".") %>현재 페이지가 저장된 경로를 알고자 할때 <br>
<%= Server.MapPath("..") %>현재 페이지가 있는 상위 디렉토리 이름 <br>
<%= Server.MapPath("/") %>홈디렉토리 경로 <br>
<%= Server.MapPath("\") %>홈디렉토리 경로 <br>
<%= Server.MapPath(rtnVlaues(0)) %>가상 디렉토리의 디렉토리 경로 <br>
<%= & Request.ServerVariables("path_info") %>
<%
Dim serverMapPath, physicalPath, filePath, serverName, serverPort, urlPath, urlQuery, urlFull
<%= Server.MapPath("..") %>현재 페이지가 있는 상위 디렉토리 이름 <br>
<%= Server.MapPath("/") %>홈디렉토리 경로 <br>
<%= Server.MapPath("\") %>홈디렉토리 경로 <br>
<%= Server.MapPath(rtnVlaues(0)) %>가상 디렉토리의 디렉토리 경로 <br>
<%= & Request.ServerVariables("path_info") %>
<%
Dim serverMapPath, physicalPath, filePath, serverName, serverPort, urlPath, urlQuery, urlFull
serverMapPath = Server.MapPath(".")
physicalPath = Request.ServerVariables("appl_physical_Path")
filePath = Request.ServerVariables("path_translated")
serverName = Request.ServerVariables("server_name")
serverPort = Request.ServerVariables("server_port")
urlPath = Request.ServerVariables("path_info")
urlQuery = Request.ServerVariables("query_string")
physicalPath = Request.ServerVariables("appl_physical_Path")
filePath = Request.ServerVariables("path_translated")
serverName = Request.ServerVariables("server_name")
serverPort = Request.ServerVariables("server_port")
urlPath = Request.ServerVariables("path_info")
urlQuery = Request.ServerVariables("query_string")
Response.Write "serverMapPath : " & serverMapPath & "<hr>"
Response.Write "physicalPath : " & physicalPath & "<hr>"
Response.Write "filePath : " & filePath & "<hr>"
Response.Write "serverName : " & serverName & "<hr>"
Response.Write "serverPort : " & serverPort & "<hr>"
Response.Write "urlPath : " & urlPath & "<hr>"
Response.Write "urlQuery : " & urlQuery & "<hr>"
Response.Write "physicalPath : " & physicalPath & "<hr>"
Response.Write "filePath : " & filePath & "<hr>"
Response.Write "serverName : " & serverName & "<hr>"
Response.Write "serverPort : " & serverPort & "<hr>"
Response.Write "urlPath : " & urlPath & "<hr>"
Response.Write "urlQuery : " & urlQuery & "<hr>"
if Len(urlQuery) > 0 then
urlFull = "http://" & serverName & ":" & serverPort & urlPath & "?" &urlQuery
else
urlFull = "http://" & serverName & ":" & serverPort & urlPath
end if
urlFull = "http://" & serverName & ":" & serverPort & urlPath & "?" &urlQuery
else
urlFull = "http://" & serverName & ":" & serverPort & urlPath
end if
Response.Write "urlFull : " & urlFull & "<hr>"
%>
%>
[출처] Server.MapPath|작성자 oklove40