简体   繁体   English

无法复制文件名中带有空格和括号的文件

[英]unable to copy files having space and bracket in filename

I am trying to copy the file name "141 (5).jpg" using the copy() function in PHP but I get constantly get hit by 我正在尝试使用PHP中的copy()函数复制文件名“ 141(5).jpg”,但是我经常被

copy(/home/141 (4).jpg): failed to open stream: No such file or directory in /home/Upload.php on line 506 复制(/ home / 141(4).jpg):无法打开流:在第506行的/home/Upload.php中没有此类文件或目录

I tried replacing space with %20 and even url encoded the complete path, but with no success. 我尝试用%20替换空间,甚至用url编码了完整的路径,但是没有成功。 Anyone has any idea on how to do it. 任何人都对如何做有任何想法。

我不确定,但是我建议将文件路径放在引号中。

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

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