Server.Variables属性大全(转载)

简介:

 

///取上一页地址

Response.Write(Request.ServerVariables["HTTP_REFERER"].ToString() + "<Br/>");

///取服务器名称(不包括端口号)

Response.Write(Request.ServerVariables["SERVER_NAME"].ToString() + "<Br/>");

///取服务器名称(包括端口号)

Response.Write(Request.ServerVariables["HTTP_HOST"].ToString() + "<Br/>");

///取服务器ip

Response.Write(Request.ServerVariables["LOCAL_ADDR"].ToString() + "<Br/>");

///取用户ip

Response.Write(Request.ServerVariables["Remote_Host"].ToString() + "<Br/>");

///取用户真实ip

Response.Write(Request.ServerVariables["REMOTE_ADDR"].ToString() + "<Br/>");

///取服务器端口号

Response.Write(Request.ServerVariables["SERVER_PORT"].ToString() + "<Br/>");

///取服务器的绝对路径

Response.Write(Request.ServerVariables["APPL_PHYSICAL_PATH"].ToString() + "<Br/>");

///取本文件的绝对路径1

Response.Write(Request.ServerVariables["PATH_TRANSLATED"].ToString() + "<Br/>");

///取本文件的绝对路径2

Response.Write(Request.ServerVariables["script_NAME"].ToString() + "<Br/>");

///取本文件的绝对路径3

Response.Write(Request.ServerVariables["PATH_INFO"].ToString() + "<Br/>");

///取地址栏后的参数

Response.Write(Request.ServerVariables["QUERY_STRING"].ToString() + "<Br/>");

///取服务器语言信息

Response.Write(Request.ServerVariables["HTTP_ACCEPT_LANGUAGE"].ToString() + "<Br/>");

///取客户端系统信息

Response.Write(Request.ServerVariables["HTTP_USER_AGENT"].ToString() + "<Br/>");

原文地址:http://www.cnblogs.com/zwffff/archive/2009/04/18/1438567.html

版权说明

  如果标题未标有<转载、转>等字则属于作者原创,欢迎转载,其版权归作者和博客园共有。
  作      者:温景良
  文章出处:http://wenjl520.cnblogs.com/  或  http://www.cnblogs.com/

posted @ 2009-04-18 20:23 温景良(Jason) Views( 100) Comments( 0) Edit 收藏
 

公告

hidden hit counter
 
本文转自 我的程序人生博客园博客,原文链接: http://www.cnblogs.com/wenjl520/archive/2009/04/18/1438843.html /,如需转载请自行联系原作者
 
相关文章
|
6月前
|
API
Deliver by interactive card server error
Deliver by interactive card server error
42 2
|
10月前
|
数据库
loading local data is disabled; this must be enabled on both the client and server sides
loading local data is disabled; this must be enabled on both the client and server sides
120 0
|
11月前
|
关系型数据库 MySQL Java
MySQL 数据库时区设置方法,“The server time zone value ‘�й���׼ʱ��‘ is unrecognized or represents ...” 问题解决
MySQL 数据库时区设置方法,“The server time zone value ‘�й���׼ʱ��‘ is unrecognized or represents ...” 问题解决
210 0
|
关系型数据库 MySQL 数据安全/隐私保护
Host is not allowed to connect to this MySQL server解决方法
Host is not allowed to connect to this MySQL server解决方法
275 0
|
关系型数据库 MySQL 数据库
MySQL - 查看 / 修改配置参数(Global Variables)
MySQL - 查看 / 修改配置参数(Global Variables)
770 0
|
关系型数据库 MySQL Java
JDBC连接Mysql时警告:Establishing SSL connection without server’s identity verification is not recommended
JDBC连接Mysql时警告:Establishing SSL connection without server’s identity verification is not recommended
JDBC连接Mysql时警告:Establishing SSL connection without server’s identity verification is not recommended
|
Python
python报错——check_hostname requires server_hostname
python报错——check_hostname requires server_hostname
249 0
python报错——check_hostname requires server_hostname