更新时间:2023-01-27 15:14:21
当前目录为系统级特性;它返回启动服务器的目录.与网站无关.
The current directory is a system-level feature; it returns the directory that the server was launched from. It has nothing to do with the website.
你想要HttpRuntime.AppDomainAppPath
.
如果您在 HTTP 请求中,您还可以调用 Server.MapPath("~/Whatever")
.
If you're in an HTTP request, you can also call Server.MapPath("~/Whatever")
.