文章出處
文章列表
/// <summary> /// 物理路徑轉網絡路徑 /// </summary> /// <param name="path"></param> /// <returns></returns> public string urlconvertor(string path) { string tmpRootDir = HttpContext.Current.Server.MapPath(System.Web.HttpContext.Current.Request.ApplicationPath.ToString());//獲取程序根目錄 string temp = "\\" + path.Replace(tmpRootDir, ""); //轉換成相對路徑 temp = temp.Replace(@"\", @"/"); return temp; }
文章列表
全站熱搜