test.asp
来自「oblog2.52商业sql版,稳定易用」· ASP 代码 · 共 41 行
ASP
41 行
<!--#include file="conn.asp"-->
<%
dim nurl
nUrl=trim("http://" & Request.ServerVariables("SERVER_NAME"))
nUrl=lcase(nUrl & request.ServerVariables("SCRIPT_NAME"))
nurl=left(nUrl,instrrev(nUrl,"/"))
response.Write(newurl("http://localhost/oblog252/face.jpg",nurl))
Function GetUrl()
'On Error Resume Next
Dim strTemp,nUrl
Url=trim("http://" & Request.ServerVariables("SERVER_NAME"))
Url=lcase(nUrl & request.ServerVariables("SCRIPT_NAME"))
url=left(nUrl,instrrev(nUrl,"/"))
dim tempReg
set tempReg=new RegExp
tempReg.IgnoreCase=true
tempReg.Global=true
tempReg.Pattern="(^.*\/).*$"'含文件名的标准路径
Url=tempReg.replace(url,"$1")
tempReg.Pattern="((?:src|href).*?=[\'\u0022](?!ftp|http|https|mailto))"
GetUrl=tempReg.replace(strContent,"$1"+Url)
set tempReg=nothing
End Function
Function newurl(strContent,byval url)
dim tempReg
set tempReg=new RegExp
tempReg.IgnoreCase=true
tempReg.Global=true
tempReg.Pattern="(^.*\/).*$"'含文件名的标准路径
Url=tempReg.replace(url,"$1")
tempReg.Pattern="((?:src|href).*?=[\'\u0022](?!ftp|http|https|mailto))"
newurl=tempReg.replace(strContent,"$1"+Url)
set tempReg=nothing
end Function
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?