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