我想在物理路径中上传文件,例如E:\Project\Folders
.
我通过在网上搜索得到了以下代码。
//check to make sure a file is selected
if (FileUpload1.HasFile)
{
//create the path to save the file to
string fileName = Path.Combine(Server.MapPath("~/Files"), FileUpload1.FileName);
//save the file to our local path
FileUpload1.SaveAs(fileName);
}
但在那方面,我想给出我上面提到的物理路径。这个怎么做?