The following VBScript function can be used in an ASP legacy application to extract the file name from a request.
public function GetFileName()
dim files, url, segments
'get then current url from the server variables
url = Request.ServerVariables("path_info")
segments = split(url,"/")
'read the last segment
url = segments(ubound(segments))
GetFileName = url
end function
No comments:
Post a Comment