<%
Public Function ServerPath
Dim Path
Dim Pos
Path="http://" & Request.ServerVariables("server_name") &Request.ServerVariables("script_name")
Pos=InStrRev(Path,"/")
ServerPath=Left(Path,Pos)
End Function
%>
本机IP:<%=request.servervariables("remote_addr")%> <br />
服务器名:<%=Request.ServerVariables("SERVER_NAME")%> <br />
服务器IP:<%=Request.ServerVariables("LOCAL_ADDR")%> <br />
服务器端口:<%=Request.ServerVariables("SERVER_PORT")%> <br />
服务器时间:<%=Now%> <br />
year:<%=year(Now)%> <br />
month:<%=month(Now)%> <br />
day:<%=day(Now)%> <br />
hour:<%=hour(Now)%> <br />
minute:<%=minute(Now)%> <br />
second:<%=second(Now)%> <br />
date:<%=date%> <br />
time:<%=time%> <br />
IIS版本:<%=Request.ServerVariables("SERVER_SOFTWARE")%> <br />
脚本超时时间:<%=Server.ScriptTimeout%> <br />
本文件路径:<%=server.mappath(Request.ServerVariables("SCRIPT_NAME"))%> <br />
服务器cpu数量:<%=Request.ServerVariables("NUMBER_OF_PROCESSORS")%> <br />
服务器解译引擎:<%=ScriptEngine & "/"& ScriptEngineMajorVersion&"."&ScriptEngineMinorVersion&"."&ScriptEngineBuildVersion %> <br />
服务器操作系统:<%=Request.ServerVariables("OS")%> <br />
支持的文件类型:<%=Request.ServerVariables("HTTP_Accept")%> <br />
访问的文件路径:<%=Request.ServerVariables("HTTP_url")%> <br />
用户代理的信息:<%=Request.ServerVariables("HTTP_USER_AGENT")%> <br />
获取url中的文件名和传过来的值:<%=request.ServerVariables("script_name")+"?"+request.ServerVariableS("QUERY_STRING")%> <br />
服务器访问路径:http://<%=Request.ServerVariables("LOCAL_ADDR")%>:<%=Request.ServerVariables("SERVER_PORT")%><%=request.ServerVariables("script_name")%><br />
当前文档所在文件目录:<% =ServerPath %>
显示结果如下:
本机IP:10.75.193.3
服务器名:10.75.193.3
服务器IP:10.75.193.3
服务器端口:80
服务器时间:2011-6-22 10:48:07
year:2011
month:6
day:22
hour:10
minute:48
second:7
date:2011-6-22
time:10:48:07
IIS版本:NetBox Version 2.8 Build 4128
脚本超时时间:-1
本文件路径:C:Program Files小旋风AspWebServerwwwrootsingleindex.asp
服务器解译引擎:VBScript/5.7.18066
服务器操作系统:
访问的文件路径:
用户代理的信息:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.6); .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
获取url中的文件名和传过来的值:/single/index.asp?
服务器访问路径:http://10.75.193.3:80/single/index.asp
所在文件目录:http://10.75.193.3/single/
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。