如何把文件上传到服务器指定的文件夹内????后台语言C#

2024-12-16 23:18:54
推荐回答(2个)
回答1:

FileUpload fileupload = (FileUpload)xxxx.FindControl("fileupload");
if (fileupload.HasFile)
{
fileupload.SaveAs(Server.MapPath("~/具体路径"+ fileupload.FileName));
}

回答2:

把本地文件上传到服务器里面吗?通过Sever-u就可以实现了