嗬嗬!
using (ZipFile zip = new ZipFile())
{
// add this map file into the "images" directory in the zip archive
zip.AddFile("c:\\images\\personal\\7440-N49th.png", "images");
// add the report into a different directory in the archive
zip.AddFile("c:\\Reports\\2008-Regional-Sales-Report.pdf", "files");
zip.AddFile("ReadMe.txt");
zip.Save("MyZipFile.zip");
}
此示例将 MyZipFile.zip 存储在“C:\Program Files (x86)\IIS Express”中,我在网上找不到任何简单的示例有没有办法更改该路径?我怀疑我有权在我的虚拟主机上去那里。