======== Accomually use the port-port URL, recommended ========================= function get_scriptnameurl () if Request.ServerVariables ("Server_Port") = "80" THEN Get_ScriptNameUrl = "http: //" & request.servervariables ( "server_name") & lcase (request.servervariables ( "script_name")) Else Get_ScriptNameUrl = "http: //" & request.servervariables ( "server_name") & ":" & Request.servervariables ("Server_Port") & lcase (Request.SerVariables ("script_name") end ifend function
'================= Use regular expressions to highlight the function of the words queried in the string ================== ===== Function BoldWord (strContent, word) If word = "" Then BoldWord = strContent Exit Function End IF dim objRegExp Set objRegExp = new RegExp objRegExp.IgnoreCase = true objRegExp.Global = True
ObjregEXP.PATTERN = "(" & Word & ")" strcontent = objRegexp.replace (strcontent, " $ 1 b> font>)
Set objRegexp = Nothing boldword = strcontentend function
'=============== acquired the user's current IP address ============================ function getip () UIP = Request.ServerVariables "Http_x_forwarded_for") if uip = "" "" Remote_Addr ") getip = uipend function
'=============== acquired the current program script path =========================== function getScriptName () scriptaddress = cstr (Request.ServerVariables ("Script_name") 'gets the current address if (Request.QueryString <> ") THEN Scriptaddress = Scriptaddress &"? "& Server.htmlencode (Request.QueryString)' gets the parameter address end ifness"> ScriptAddress> 250 THEN Scriptaddress = Left (Scirptaddress, 250) & "..." performs path interception, maximum of 250 characters getScriptName = scriptaddressend function '=========== Return the URL with parameters, multi-key Use ========================================================================================================== # Request.ServerVariables ("Script_name") ") &"? "Gets the current address, and add"? "Symbol m_itemurl =" "for Each M_Item in request.queryString if INSTR (REMOVELIST, M_ITEM) = 0 THEN M_ITEMURL = M_ItemURL & M_Item & "=" & Server.urlencode ("& M_Item &")) & "&" Endix ") &" & "End If Next KeepURLSTR = Scriptaddress & M_Itemlend Function