多线程或线程池下的相对路径转绝对路径
if (HttpContext.Current != null)
{
localpath = HttpContext.Current.Server.MapPath(directorypath);
}
else
{
directorypath = directorypath.Replace("/", "\\");
localpath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, directorypath);
}
浙公网安备 33010602011771号