当前位置: 移动技术网 > IT编程>开发语言>Asp > asp中Request.ServerVariables的参数集合

asp中Request.ServerVariables的参数集合

2020年03月09日  | 移动技术网IT编程  | 我要评论

asp(vb)获取计算机名:

<%set owsh = server.createobject("wscript.network")%>
<%=owsh.computername%>

判断cookie是否可用(禁止)

asp(vb):

<%set objbc=server.createobject("mswc.browsertype")%>
<%= objbc.cookies%>

也可以在前一页面中写入cookie 在下一页面调用,如调用不成功则说明cookie不可用。

<%
response.cookies("cookieenable2y")="yes"
response.cookies("cookieenable2y").expires=date+30
%>

<%
set objbc=server.createobject("mswc.browsertype")
if request.cookies("cookieenable2y")<>"yes" or (not objbc.cookies) then
msg="错误,cookie不可用,请正确设置浏览器!"
a=""
end if
%>

js:

<script language="javascript">
function check(){
if(window.navigator.cookieenabled)
   return true;
else{
   alert("浏览器配置错误,cookie不可用!");
   return false;}
}
</script>

request.servervariables("url")
返回服务器地址

request.servervariables("path_info")
客户端提供的路径信息

request.servervariables("appl_physical_path")

与应用程序元数据库路径相应的物理路径

request.servervariables("path_translated")

通过由虚拟至物理的映射后得到的路径

request.servervariables("script_name")

执行脚本的名称

request.servervariables("query_string")

查询字符串內容

request.servervariables("http_referer")
上个页面地址

request.servervariables("server_port")
接受请求的服务器端口号

request.servervariables("remote_addr")
发出请求的远程主机的ip地址

request.servervariables("remote_host")
发出请求的远程主机名称

request.servervariables("local_addr")
返回接受请求的服务器地址

request.servervariables("http_host")
返回服务器地址

request.servervariables("server_name")
服务器的主机名、dns地址或ip地址

request.servervariables("request_method")
提出请求的方法比如get、head、post等等

request.servervariables("server_port_secure")
如果接受请求的服务器端口为安全端口时,则为1,否则为0

request.servervariables("server_protocol")
服务器使用的协议的名称和版本

request.servervariables("server_software")
应答请求并运行网关的服务器软件的名称和版本

request.servervariables("all_http")
客户端发送的所有http标头,前缀http_

request.servervariables("all_raw")
客户端发送的所有http标头,其结果和客户端发送时一样,没有前缀http_

request.servervariables("appl_md_path")
应用程序的元数据库路径

request.servervariables("content_length")
客户端发出內容的长度

request.servervariables("https")
如果请求穿过安全通道(ssl),则返回on如果请求来自非安全通道,则返回off

request.servervariables("instance_id")
iis实例的id号

request.servervariables("instance_meta_path")
响应请求的iis实例的元数据库路径

request.servervariables("http_accept_encoding")
返回內容如:gzip,deflate

request.servervariables("http_accept_language")
返回內容如:en-us

request.servervariables("http_connection")
返回內容:keep-alive

request.servervariables("http_cookie")
返回內容如:nvisit%

2dyum=125;aspsessionidcartqtra=fdobffabjgoecbbkhkgpfiji;aspsessionidcaqqtsrb=lkjjplababillpcogjgamkam;aspsessionidacrrssra=dk

hhhfbbjojcconpphlkghpb

request.servervariables("http_user_agent")
返回內容:mozilla/4.0(compatible;msie6.0;windowsnt5.1;sv1)

request.servervariables("https_keysize")
安全套接字层连接关键字的位数,如128

request.servervariables("https_secretkeysize")
服务器验证私人关键字的位数如1024

request.servervariables("https_server_issuer")
服务器证书的发行者字段

request.servervariables("https_server_subject")
服务器证书的主题字段

request.servervariables("auth_password")
当使用基本验证模式时,客户在密码对话框中输入的密码

request.servervariables("auth_type")
是用户访问受保护的脚本时,服务器用於检验用户的验证方法

request.servervariables("auth_user")
代证的用户名

request.servervariables("cert_cookie")
唯一的客户证书id号

request.servervariables("cert_flag")
客户证书标誌,如有客户端证书,则bit0为0如果客户端证书验证无效,bit1被设置为1

request.servervariables("cert_issuer")
用户证书中的发行者字段

request.servervariables("cert_keysize")
安全套接字层连接关键字的位数,如128

request.servervariables("cert_secretkeysize")
服务器验证私人关键字的位数如1024

request.servervariables("cert_serialnumber")
客户证书的序列号字段

request.servervariables("cert_server_issuer")
服务器证书的发行者字段

request.servervariables("cert_server_subject")
服务器证书的主题字段

request.servervariables("cert_subject")
客户端证书的主题字段

request.servervariables("content_type")
客户发送的form內容或httpput的数据类型 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网