ASP関数セット
'==========ポートでURLを入手してください。==================
functionget_scriptnameurl()
ifrequest.servervariables( "server_port")= "80"その後
get_scriptnameurl = "http://"&request.servervariables( "server_name")&lcase(request.servervariables( "script_name")))
それ以外
get_scriptnameurl = "http://"&request.servervariables( "server_name")& ":"&request.servervariables( "server_port")&lcase(request.servervariables( "script_name")))
endif
エンド機能
'============================================================================================================
functionboldword(strcontent、word)
ifword = "" then
boldword = strcontent
exitFunction
endif
dimobjregexp
setobjregexp = newRegexp
objregexp.ignorecase = true
objregexp.global = true
objregexp.pattern = "("&word& ")"
strcontent = objregexp.replace(strcontent、 "<fontcolor =" "#ff0000" "> <b> $ 1 </b> </font>")
setobjregexp =何も
boldword = strcontent
エンド機能
'=====================ユーザーの現在のIPアドレスを取得==================
functiongetip()
uip = request.servervariables( "http_x_forwarded_for")
ifuip = "" thenuip = request.servervariables( "remote_addr")
getIp = uip
エンド機能
'==================現在、現在のプログラムスクリプトパスを入手してください==================
functiongetScriptName()
scriptaddress = cstr(request.servervariables( "script_name")) '現在のアドレスを取得します
if(request.querystring <> "")then
scriptaddress = scriptaddress& "?"&server.htmlencode(request.QueryString) 'パラメーターでアドレスを取得します
endif
iflen(scriptaddress)> 250thenscriptaddress = left(sciptaddress、250)& "..." 'パスインターセプト用、最大250文字で
getScriptName = ScriptAddress
エンド機能
'=============== [パラメーターでURLを返します。
'Removelistパラメーター:URLから削除する必要があるパラメーターは複数になります。中央のコンマで分離してください。
functionkeepurlst(removelist)
scriptaddress = cstr(request.servervariables( "script_name"))& "?" '現在のアドレスを取得して "?"を追加しますシンボル
m_itemurl = ""
foreachm_iteminrequest.querystring
ifinstr(removelist、m_item)= 0then
m_itemurl = m_itemurl&m_item& "="&server.urlencode(request.querystring( "&m_item&" "))&"& "