//相对路径 string FilePath = Server.MapPath("./") + "ImageFile/Images/" + DateTime.Now.Year.ToString() + "Year/" + DateTime.Now.Month.ToString() + "Month/"; DirectoryInfo di = new DirectoryInfo(FilePath); if (!di.Exists)//若是没有就建立 {di.Create();} //绝对路径 string receivePath = @"C:/ImageFile/Images/" + DateTime.Now.Year.ToString() + "Year/" + DateTime.Now.Month.ToString() + "Month/"; DirectoryInfo di = new DirectoryInfo(receivePath); if (!di.Exists) { di.Create(); }
var getStr = Str.Split(new string[] { "$tempId$" }, StringSplitOptions.None);
string Name ="asdsa,asdsa,21321," Name = Name .TrimEnd(','); //输出以后 asdsa,asdsa,21321