C#取得Web程序和非Web程序的根目录的N种取法总结
程序员文章站
2022-06-30 09:49:27
非web程序 1.appdomain.currentdomain.basedirectory 2.environment.currentdirectory 3.httpru...
非web程序
1.appdomain.currentdomain.basedirectory
2.environment.currentdirectory
3.httpruntime.bindirectory
the path to the current application's/bin directory.
web程序
httpcurrent.context.server.mappath();
1.appdomain.currentdomain.basedirectory
2.environment.currentdirectory
3.httpruntime.bindirectory
the path to the current application's/bin directory.
web程序
httpcurrent.context.server.mappath();