。在数据层中我想的到目录的路径,string path=Server.MapPath("..⼀upfile⼀");

谁知道啊!好心人帮帮我啊!请勿呼huyou-------
2025-06-23 03:13:56
推荐回答(2个)
回答1:

string path=Server.MapPath("~"); //网站根目录,可向下继续延伸如"~/Images"或"~/Images/Project"

回答2:

string path=Server.MapPath(Request.ApplicationPath + "/userphoto/")
返回的是当前网站下面的userphoto目录的绝对路径。