网站上加了一个功能,用了一个SharpZipLib,让用户把网站上的图片打包下载。我在本地运行时可以啊,可是挂到网上去就不行了啊。temp我用代码建的一个文件夹:
[code=C#]
 for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
 {
     string image = ds.Tables[0].Rows[i][0].ToString();
     string pname = ds.Tables[0].Rows[i][1].ToString();
     if (!Directory.Exists("temp/" + pname))
     {
          Directory.CreateDirectory("temp/" + pname);
      }
      File.Copy(Server.MapPath("~/products/") + image, Server.MapPath("~/temp/" + pname + "/") + image);
  }
     string fileName = cname + "_" + DateTime.Now.Year + "_" + DateTime.Now.Month + "_" + DateTime.Now.Day.ToString() + "_" + DateTime.Now.Hour.ToString();
                dlZipDir(Server.MapPath("~/temp"), fileName);
code]
是不是在网上没有权限的问题啊,