<%@language="vbscript"%>
<%Option Explicit%>
<%
'asp獲取當前物理路徑
Dim foraspcnbase,foraspcnurl,foraspcntemp,foraspcntemp_array,foraspicn,foraspfactcn
Function foraspcn()
foraspcnbase = request.ServerVariables("APPL_PHYSICAL_PATH")'獲取當前站點物理路徑
foraspcnurl = Request.ServerVariables("SCRIPT_NAME")'獲取當前頁面物理路徑
foraspcntemp = Left(foraspcnbase,Len(foraspcnbase)-1) &Replace(foraspcnurl,"/","\")
foraspcntemp_array = Split(foraspcntemp,"\")
For foraspicn = 0 To UBound(foraspcntemp_array)-1
foraspfactcn = foraspfactcn&foraspcntemp_array(foraspicn)&"\"
Next
foraspcn = foraspfactcn
End Function
response.write foraspcn()'輸出當前物理路徑
%>
更多信息請查看IT技術專欄