这代码什么意思?
private bool IsSupperMode()
{
string ipstr = "A" + Request.ServerVariables["LOCAL_ADDR"].ToUpper();
return (ipstr.IndexOf("A10.1.1.") != -1);
}
private bool IsSupperMode()
{
string ipstr = "A" + Request.ServerVariables["LOCAL_ADDR"].ToUpper();
return (ipstr.IndexOf("A10.1.1.") != -1);
}
ServerVariables
然后就是判断"A"+这个地址中有无"A10.1.1."
读取IP位址的环境变量"LOCAL_ADDR"
判断整段有没有A10.1.1.这个字串
没有返回flase,有返回true