知道为什么要加postion=InstrRev(fileName,"/")+1
fileName=Mid(fileName,postion)
If InStr(fileName,"?")> 0 Then
arrName=fileName
arrName=Split(arrName,"?")
filename=arrName(0)
End If
这个判断吗?
假如只有http://topic.csdn.net/788183.html这种形式直接Request.ServerVariables("script_name")
但是http://topic.csdn.net/t/20020608/11/788183.html
这样的你不判断不行了!
Dim fileName,arrName,postion
fileName=Request.ServerVariables("script_name")
postion=InstrRev(fileName,"/")+1
fileName=Mid(fileName,postion)
If InStr(fileName,"?")>0 Then
arrName=fileName
arrName=Split(arrName,"?")
filename=arrName(0)
End If
Response.Write filename