日期:2014-05-18 浏览次数:21023 次
var filename = Server.MapPath("fbb.jpg"); FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read); byte[] infbytes = new byte[(int)fs.Length]; fs.Read(infbytes, 0, infbytes.Length); fs.Close(); File.WriteAllBytes(Server.MapPath("2.jpg"), infbytes);
var filename = Server.MapPath("fbb.jpg"); FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read); byte[] infbytes = new byte[(int)fs.Length]; fs.Read(infbytes, 0, infbytes.Length); fs.Close(); //return infbytes; var pic = Encoding.Default.GetString(infbytes); File.WriteAllBytes(Server.MapPath("2.jpg"), Encoding.Default.GetBytes(pic));