Go homepage(回首页)
Upload pictures (上传图片)
Write articles (发文字帖)

The author:(作者)归海一刀
published in(发表于) 2014/1/30 1:19:55
asp.net判断链接是否来自外部_[Asp.Net教程]

asp.net判断链接是否来自外部_[Asp.Net教程]
使用的方法是:
public bool IsUrl()
{
string str1 = System.Web.HttpContext.Current.Request.ServerVariables["HTTP_REFERER"];
string str2 = System.Web.HttpContext.Current.Request.ServerVariables["SERVER_NAME"];
return ((str1 != null) && (str1.IndexOf(str2) == 7));
}


If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)





QQ:154298438
QQ:417480759