>>>这个web程式所在的根虚拟目录的名称及其绝对路径
try
public class YourClass
{
public string 虚拟目录的名称
{
get { return System.Web.HttpContext.Current.Request.ApplicationPath;}
} public string 虚拟目录绝对路径
{
get { return System.Web.HttpContext.Current.Request.PhysicalApplicationPath;}
}}
try
public class YourClass
{
public string 虚拟目录的名称
{
get { return System.Web.HttpContext.Current.Request.ApplicationPath;}
} public string 虚拟目录绝对路径
{
get { return System.Web.HttpContext.Current.Request.PhysicalApplicationPath;}
}}
System.Web.HttpContext.Current.Request.MapPath( "/" + path ) ;
不得不再举起一次大拇指!