Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的应用程序正在登录服务器,基于用户凭据的默认目录将其放在 /dir1/dir2/dir3/。
所以在 dir3 中放置或获取文件没有问题,但是如何将目录更改为 dir2 - 父级?
在您的路径中,使用 %2f 代替 ../ 例如代替
FtpWebRequest.Create("ftp://myftp.com/../parent") as FtpWebRequest
做这个
FtpWebRequest.Create("ftp://myftp.com/%2fparent") as FtpWebRequest