All articles(网络文学目录) All Pictures(图片目录) All Softwares(软件目录)

 
asp.net判断链接是否来自外部_[Asp.Net教程]

Writer: 归海一刀 Article type: Programming skills(编程技巧) Time: 2014/1/30 1:19:55 Browse times: 338 Comment times: 0

asp.net判断链接是否来自外部_[Asp.Net教程]


Head photo

Go homepage
Upload pictures
Write articles

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));
}




There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)

Disclaimer Privacy Policy About us Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.