扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:佚名 来源:codeof 2007年10月16日
关键字: asp ServerVariables
在本页阅读全文(共19页)
<FORM ACTION=”<% = Request.ServerVariables(“PATH_INFO”) %>” METHOD=”POST”> |
<FORM ACTION=”<% = Request.ServerVariables(“SCRIPT_NAME”) %>” METHOD=”POST”> |
... <% strFullPath = Request.ServerVariables(“PATH_INFO”) ‘Strip off the file name strPathOnly = Left(strFullPath, InStrRev(strFullPath, “/”)) strNextPage = strPathOnly & “pages/next_page.asp” %> ... <A HREF=”<% = strNextPage %>”>Next Page</A> ... |
strFullURL = http:// & Request.ServerVariables(“LOCAL_ADDR”) _ & “:” & Request.ServerVariables(“SERVER_PORT”) _ & Request.ServerVariables(“PATH_INFO”) |
http://194.74.60.254:1768/thispath/thispage.asp |
<% strUA = Request.ServerVariables(“HTTP_USER_AGENT”) Response.Write “The User Agent string is <B>” & strUA & “</B> ” If InStr(strUA, “MSIE”) Then Response.Write “To upgrade your browser go to “_ & “<A HREF=” & Chr(34) & http://www.microsoft.com/ie/”_ & Chr(34) & “>http://www.microsoft.com/ie/<A> ” intVersion = Cint(Mid(strUA, InStr(strUA, “MSIE”) + 5, 1)) If intVersion >=4 Then Response.Write “You can use Microsoft Dynamic HTML” End If Else If InStr(strUA, “Mozilla”) Then If InStr(strUA, “compatible;”) = 0 Then Response.Write “Your browser is probably Navigator. You can “_ & “download the latest version of Navigator from “_ & “<A HREF=” & Chr(34) & http://home.netscape.com/”_ & “download/”& Chr(34) & “>http://home.netscape.com”_ & “/download/</A> ” intVersion = Cint(Mid(strUA, InStr(strUA, “/”) +1, 1)) If intVersion >= 4 Then Response.Write “You can probably use Netscape Dynamic HTML” End If Else strVersion = Mid(strUA, InStr(strUA, “compatible;”) + 12) strProduct = Left(strVersion, InStr(strVersion, “ “)) Response.Write “Your browser is Navigator-compatible. You can”_ & “search for the manufacturer using a search engine, such as”_ & “<A HREF=” & Chr(34) _ & “http://www.altavista.digital.com/cgi-bin/query?q=”_ & strProduct _ & Chr(34) & “>http://www.altavista.com/</A> ” End If End If End If %> |
StrLocale = Lcase(Left(Request.ServerVariables(“HTTP_ACCEPT_LANGUAGE”),2)) Select Case strLocale Case “en”: Response.Redirect “http://uk_site.co.uk/” Case “de”: Response.Redirect “http://de_site.co.de/” Case “fr”: Response.Redirect “http://fr_site.co.fr/” ‘... etc Case Else: Response.Redirect “http://us_sitel.com/” End Select |
strLocale = Lcase(Request.ServerVariables(“HTTP_ACCEPT_LANGUAGE”)) Select Case strLocale Case “en-gb”: Response.Redirect “http://uk_site.co.uk/” Case “en-us”: Response.Redirect “http://us_site.com/” Case “es-pe”: Response.Redirect “http://es_site2.co.pe/” ‘... Case Else: Response.Redirect “http://us_site1.com/” End Select |
If Request.ServerVariables(“SERVER_PORT”) = “443”) Then Response.Redirect “/securesite/default.asp” ‘Secure user Else Response.Redirect “/normalsite/default.asp” ‘Non-secure user End If |
... <A HREF=”dispcnfg.asp”>Change Display Configuration</A> <A HREF=”dispcolr.asp”>Change Display Colors</A> <A HREF=”keyboard.asp”>Change Keyboard Configuration</A> <% If Request.ServerVariables(“AUTH_USER”) _ = Ucase(Request.ServerVariables(“SERVER_NAME”)) & “\Administrator” Then %> <A HREF=”allusers.asp”>Administer All Users</A> <A HREF=”usrlogon.asp”>Administer Logon Information</A> <% End If %> ... |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者