Server.MapPath - Physical path given, virtual path expected

后端 未结 2 727
一向
一向 2020-11-29 04:13

I\'m using this line of code:

var files = Directory.GetFiles(Server.MapPath(\"E:\\\\ftproot\\\\sales\"));

to locate files in a folder howev

2条回答
  •  迷失自我
    2020-11-29 04:47

    if you already know your folder is: E:\ftproot\sales then you do not need to use Server.MapPath, this last one is needed if you only have a relative virtual path like ~/folder/folder1 and you want to know the real path in the disk...

提交回复
热议问题