我想知道是否有人可以帮助我。
我有以下 URL(这是动态的)
www.website.com/images/gal/boxes-pic004.asp
我如何使用经典 ASP 提取“boxes-pic004”部分
Thanks
<%
Dim sScriptLocation, sScriptName, iScriptLength, iLastSlash
sScriptLocation = Request.ServerVariables("URL")
iLastSlash = InStrRev(sScriptLocation, "/")
iScriptLength = Len(sScriptLocation)
sScriptName = Right(sScriptLocation, iScriptLength - iLastSlash)
%>
sScriptName
然后将包含boxes-pic004.asp
,那么你可以使用Replace(sScriptName, ".asp", "")
也删除扩展名。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)