`
izuoyan
  • 浏览: 8935583 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

几个常用Request.ServerVariables的中文

阅读更多

本文件ip路径:<%="http://" & request.servervariables("server_name")& request.servervariables("_name") %>

本机ip:<%=request.servervariables("remote_addr")%>

服务器名:<%=Request.ServerVariables("SERVER_NAME")%>

服务器IP:<%=Request.ServerVariables("LOCAL_ADDR")%>

服务器端口:<%=Request.ServerVariables("SERVER_PORT")%>

服务器时间:<%=now%>

IIS版本:<%=Request.ServerVariables("SERVER_SOFTWARE")%>

脚本超时时间:<%=Server.Timeout%>

本文件路径:<%=server.mappath(Request.ServerVariables("_NAME"))%>

服务器CPU数量:<%=Request.ServerVariables("NUMBER_OF_PROCESSORS")%>

服务器解译引擎:<%=Engine & "/"& EngineMajorVersion &"."&EngineMinorVersion&"."& EngineBuildVersion %>

服务器操作系统:<%=Request.ServerVariables("OS")%>

支持的文件类型:<%=Request.ServerVariables("HTTP_Accept")%>

访问的文件路径:<%=Request.ServerVariables("HTTP_url")%>

用户代理的信息:<%=Request.ServerVariables("HTTP_USER_AGENT")%>

获取url中的文件名和传过来的值:request.ServerVariables("_name")+"?"+request.ServerVariableS("QUERY_STRING")

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

产生的如下:

本文件ip路径:http://localhost/ceshi.asp

本机ip:127.0.0.1

服务器名:localhost

服务器IP:127.0.0.1

服务器端口:8091

服务器时间:2005-7-27 14:28:04

IIS版本:Microsoft-IIS/5.0

脚本超时时间:90

本文件路径:E:\hospital\ceshi.asp

服务器CPU数量:2

服务器解译引擎:VB/5.6.7426

服务器操作系统:Windows_NT

支持的文件类型:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*

访问的文件路径:/ceshi.asp

用户代理的信息:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; COM+ 1.0.2204)

如若获得此文件的目录可以利用下面的函数:

<%

Public ServerPath

Dim Path

Dim Pos

Path="http://" & Request.ServerVariables("server_name") & Request.ServerVariables("_name")

Pos=InStrRev(Path,"/")

ServerPath=Left(Path,Pos)

End

%>

=====================

所在文件目录:<%=ServerPath%>

=====================

分享到:
评论

相关推荐

    Request.ServerVariables

    Request.ServerVariables Request.ServerVariables Request.ServerVariables Request.ServerVariables

    Request.ServerVariables参数集

    Request.ServerVariables参数集,本人博客有详细信息 http://gaobo403163953.blog.163.com

    asp中Request.ServerVariables的参数集合

    主要介绍了asp中Request.ServerVariables的参数集合,需要的朋友可以参考下

    asp.net Request.ServerVariables[] 读解

    获取客户端的IP地址,代码如下: 代码如下: /// &lt;summary&gt; /// 获取客户端IP地址 /// &lt;/summary&gt; /// &lt;returns&gt;&lt;/returns&gt; public string GetClientIP() { string userIP = Request.ServerVariables[...

    获取客户端IP函数详细做法

    strIPAddr = Request.ServerVariables("REMOTE_ADDR") ElseIf InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ",") &gt; 0 Then strIPAddr = Mid(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), 1, ...

    C#实用类集DdotNet

    ip = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString(); else ip = System.Web.HttpContext.Current.Request.ServerVariables["HTTP_X_ForWARDED_For"].ToString(); if (ip....

    ASP如何获取真实IP地址

    不过要注意的是,并不是每个代理服务器都能用Request.ServerVariables("HTTP_X_FORWARDED_FOR")来读取客户端的真实 IP,有些用此方法读取到的仍然是代理服务器的 IP。 还有一点需要注意的是:如果客户端没有...

    ASP获取ip地址_服务器时间等

    ASP获取ip地址_服务器时间。...不过要注意的事,并不是每个代理服务器都能用 Request.ServerVariables("HTTP_X_FORWARDED_FOR") 来读取客户端的真实 IP,有些用此方法读取到的仍然是代理服务器的IP。

    request对象与作用

    如:&lt;%=request.ServerVariables("server_name")%&gt;获取域名 Request.ServerVariables(Url) 返回服务器地址 Request.ServerVariables(Path_Info) 客户端提供的路径信息 Request.ServerVariables(Appl_Physical_...

    .NET常用Request获取信息总结

    Request.ServerVariables(“REMOTE_ADDR”) ‘获取访问IPRequest.ServerVariables(“LOCAL_ADDR”) ‘同上Request.ServerVariables(“SERVER_NAME”) ‘获取服务器IPRequest.ServerVariables(“HTTP_REFERER”) ...

    常用获取ServerVariables

    常用SERVER.ServerVariables

    C# IP定位代码实例

    result = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]; if (result == null || result == String.Empty) result = HttpContext.Current.Request.UserHostAddress; return result; } } #...

    Request_ServerVariables参数详解

    Request_ServerVariables参数总结详解,查询服务器信息,就用到它了,服务器IP、域名等查询方法俱全

    几个常用的ASP函数

    ========取得带端口的URL,推荐使用================ Function Get_ScriptNameUrl() If request.servervariables(“SERVER_PORT”)=”80″ Then Get_ScriptNameUrl=”http://” & request.servervariables...

    asp.net中Request.QueryString与Request.Param的区别分析

    request.params其实是一个集合,它依次包括request.querystring、request.form、request.cookies和request.servervariables。 如果要在两个页面传递数据的话,只能用request.querystring、request.form、request....

    asp获取服务器信息.txt

    Request.ServerVariables("Url") 返回服务器地址 Request.ServerVariables("Path_Info") 客户端提供的路径信息 Request.ServerVariables("Appl_Physical_Path") 与应用程序元数据库路径相应的物理路径 ...

    asp.net获取真实ip的方法

    本文实例讲述了asp.net获取真实ip的方法。分享给大家供大家参考。具体如下: public string getip() ... result = HttpContext.Current.Request.ServerVariables[REMOTE_ADDR]; } if (null == resul

    asp Http_Referer,Server_Name和Http_Host

    =Request.ServerVariables.count%&gt; 以前感觉Request.ServerVariables里的值很多,现在看看还是那么多,不过今天谈其中的一个值—-HTTP_Referer 首先,我们先知道HTTP_Referer最常用的应用就是能够防止外部提交。...

Global site tag (gtag.js) - Google Analytics