ASP中怎样取得当前文件路径。(100分)

T

testnet

Unregistered / Unconfirmed
GUEST, unregistred user!
当访问
http://abc.com/test.asp
时我能在ASP中把实际路径保存在S中。
如果test.asp在c:/www/test.asp
我能得到S='c:/www'
 
不明白你的意思
 
应该可以吧,得到的应该是 file://c:/www这个。
(没有试验)
 
server.pathmap
 
呵呵是 Server.MapPath 吧:)
 
Server.MapPath 得到好像是C:/www/test.asp
但我要的是C:/WWW/
 
自己再处理一下啦。left(Server.MapPath("test.asp"),len(Server.MapPath("test.asp"))-8)
 
Server.MapPath("/test.asp") 得到:c:/www/test.asp
Server.MapPath("/")&"/" 得到:c:/www/
Server.MapPath("../.../")&"/"得到:c:/
 
多人接受答案了。
 
顶部