摘要:從網址或檔案路徑中取得檔名的方法
在ASPFAQ看到的...
蠻簡短的程式...
針對檔案路逕取得檔名
<%
path = "C:\inetpub\wwwroot\default.asp"
parts = split(path,"\")
response.write parts(ubound(parts))
%>
path = "C:\inetpub\wwwroot\default.asp"
parts = split(path,"\")
response.write parts(ubound(parts))
%>
針對網址取得檔名
<%
path = "http://localhost/default.asp"
parts = split(path,"/")
response.write parts(ubound(parts))
%>
path = "http://localhost/default.asp"
parts = split(path,"/")
response.write parts(ubound(parts))
%>