public static bool WriteFile(string strText.pdf

时间:2022-09-09 16:08:40
【文件属性】:

文件名称:public static bool WriteFile(string strText.pdf

文件大小:75KB

文件格式:PDF

更新时间:2022-09-09 16:08:40

 WriteFile

public static bool WriteFile(string strText,string strContent,string strAuthor) { string path = HttpContext.Current.Server.MapPath("/news/"); Encoding code = Encoding.GetEncoding("gb2312"); string temp = HttpContext.Current.Server.MapPath("/news/template.html"); StreamReader sr=null; StreamWriter sw=null; string str=""; try { sr = new StreamReader(temp, code); str = sr.ReadToEnd(); } catch(Exception exp) { HttpContext.Current.Response.Write(exp.Message); HttpContext.Current.Response.End(); sr.Close(); } -----------------------


网友评论