更新时间:2023-01-27 15:19:09
您可以使用HttpServerUtility.MapPath方法来映射任何相对路径为你,在你的控制器,这是通过方便的 ControllerContext
:
You can use the HttpServerUtility.MapPath method to map any relative paths for you, in your controller this is easily accessible via the ControllerContext
:
string path = ControllerContext.HttpContext.Server.MapPath("~/_xslt/example.xslt");
...