简体   繁体   English

如果名称中有空格,如何在Net :: FTP中获取当前的工作目录?

[英]How do I get the current working directory in Net::FTP if its name has a space?

I'm using Net::FTP to put a file on a remote server. 我正在使用Net :: FTP将文件放在远程服务器上。 I need to put the file in a folder whose name contains a space character. 我需要将文件放在名称包含空格字符的文件夹中。 The cwd() method seems to not like the following arguments and nothing seems to work. cwd()方法似乎不喜欢以下参数,并且似乎没有任何作用。

$ftp->cwd('My Folder')

$ftp->cwd('"My Folder"')

$ftp->cwd('\\"My Folder\\"')

Has anyone done this before? 有人做过吗? How do I cwd into "My Folder" ? 我如何将其存入“我的文件夹”?

TIA. TIA。

只是尝试了一下,它工作正常:

$ftp->cwd('My Folder');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM