日期:2014-05-18 浏览次数:20758 次
string UserID = MemberMessage.MemberID.ToString(); //string UserID = "45";//直接写死的id可以, IE 火狐 可以上传 但是换成上面的写法就不行了 求解 string pathStr = "/images/upload/UserAlbum/User" + UserID; string path = Server.MapPath(pathStr); if (!System.IO.Directory.Exists(path)) { System.IO.Directory.CreateDirectory(path); } string FileName = DateTime.Now.ToString("yyyyMMddHHmmss") + "_" + Request.Form["fileName"]; string savePath = path + "/" + FileName; file.SaveAs(savePath);