Web三层开发中,dal类库如何得到当前网站运行的物理路径?

dal层主要是处理数据访问之类的操作,那么如何获取网站运行时根目录的物理路径呢?

//string xmlPath=@""D:\aa\bb\test.xml"

string xmlPath=AppDomain.CurrentDomain.BaseDirectory+"test.xml"



相看AppDomain 类.




posted @ 2011-12-22 14:40  lenya  阅读(134)  评论(0编辑  收藏  举报