复制代码 代码如下:
/// <summary>
/// 获取客户端IP地址
/// </summary>
/// <returns></returns>
public string GetClientIP()
{
string userIP = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (userIP == null)
userIP = Request.ServerVariables["REMOTE_ADDR"];
return userIP;
}
新闻热点
疑难解答
图片精选