//利用“BinaryWriter”對byte[]進行保存

                        //利用“BinaryWriter”對byte[]進行保存

                        string strUrl = System.Web.HttpContext.Current.Server.MapPath(strUpPath + @"/" + FileName + ext);

                        System.IO.FileStream fs = new System.IO.FileStream(strUrl, System.IO.FileMode.Create, System.IO.FileAccess.Write);
                        System.IO.BinaryWriter bw = new System.IO.BinaryWriter(fs);
                        bw.Write(bytes);
                        bw.Flush();
                        fs.Flush();
                        bw.Close();
                        fs.Close();

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章