摘要:
HttpResponse response = HttpContext.Current.Response; response.Buffer = true; response.Clear(); response.ClearContent(); response.AddHeader("Content-D 阅读全文
摘要:
/// <summary> /// 将 Stream 转成 byte[] /// </summary> public byte[] StreamToBytes(Stream stream) { byte[] bytes = new byte[stream.Length]; stream.Read(b 阅读全文
摘要:
System.IO.StreamWriter sw = System.IO.File.AppendText( LogPath + LogFielPrefix + "Error-" + DateTime.Now.ToString("yyyy-MM-dd") + ".Log" ); sw.WriteLi 阅读全文
摘要:
已知本地文件名,返回给前台流 string filepath = path +“/” + filename +".txt"; if(System.IO.File.Exists(filepath)) { byte[] bytes; using (Stream stream = new Filestre 阅读全文