How to get virtual directory physical path

前端 未结 6 2187
没有蜡笔的小新
没有蜡笔的小新 2021-01-04 20:55

As we know that a virtual direcoty can be linked to a folder with a diffrent name, how can I get the physical path of a virtual directory ?

I\'ve been trying with Ht

6条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-04 21:54

    Server.MapPath("~/Images")
    

    is the correct way to go about it as "~" references the root of your application.

提交回复
热议问题