ASP.NET Get physical filepath from URL

前端 未结 3 2088
囚心锁ツ
囚心锁ツ 2021-01-18 02:09

Is there a way to get the physical filepath from an ASP.NET\'s URL?

Scenerio: I have an app that is on two severs, but it will now be on lots more, and each server p

3条回答
  •  感动是毒
    2021-01-18 02:53

    This Server.MapPath ( "/" ); or this HttpContext.Current.Server.MapPath ( "/" ); should give you what you need.

提交回复
热议问题