asp程序如何知道文件实际目录?

xyz2000 2000-04-28 12:16:00
设iis 安装在NT 的c:\intetpub\wwwroot上,文件index.htm在d:\for123\下。
d:\for123这个物理路径在iis中的虚拟名称是asp。

问题:
用什么方法得到http://127.0.0.1/asp/index.htm这个文件的真实物理路径d:\for123\index.htm?
我尝试过server.mappath函数功能不行:
server.mappath("/")返回值是c:\inetpub\wwwroot ;
server.mappath("/index.htm")返回值是"c:\inetpub\wwwroot\index.htm"而不是d:\for123\index.htm


...全文
263 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Dannel 2000-04-28
  • 打赏
  • 举报
回复
server.mappath("./index.htm")就可以了!
zdg 2000-04-28
  • 打赏
  • 举报
回复
server.mappath("/asp/index.htm")试一试...
xyz2000 2000-04-28
  • 打赏
  • 举报
回复
不行!
server.mappath("/index.htm")返回值是"c:\inetpub\wwwroot\index.htm"而不是d:\for123\index.htm


28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧