多线程或线程池下的相对路径转绝对路径

                if (HttpContext.Current != null)
                {                       
                  localpath = HttpContext.Current.Server.MapPath(directorypath);                  
                }
                else
                {
                    directorypath = directorypath.Replace("/", "\\");                              
                    localpath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, directorypath);
                }

  

posted on 2018-04-12 17:06  河边梧桐  阅读(130)  评论(0编辑  收藏  举报

导航