search

Home  >  Q&A  >  body text

c# - Obtaining the physical path when saving the mvc file

File saving, how to obtain the physical path corresponding to the project virtual path, how to obtain the file path when the file path cannot be passed through parameters in the service layer or infrastructure layer?

高洛峰高洛峰2791 days ago599

reply all(1)I'll reply

  • 滿天的星座

    滿天的星座2017-05-16 17:08:02

    System.Web.HttpContext.Current.Server.MapPath("~/文件夹名/文件名");
    

    reply
    0
  • Cancelreply