<%@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技术专栏