How to get virtual directory physical path

前端 未结 6 2226
没有蜡笔的小新
没有蜡笔的小新 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:46

    What if you try this little snippet?

    string physicalPath = HttpContext.Current.Request.MapPath(appPath);
    

提交回复
热议问题