简体   繁体   English

无法使用ftp脚本下载或上传文件

[英]unable to download or upload the files using ftp script

i am unable to download or upload the files using ftp script. 我无法使用ftp脚本下载或上传文件。 i can connect to ftp server find the size of the file using ftp_size but when i download it using both ftp_get and ftp_fget the file is empty.i cant even seem to see the list of directories using ftp_nlist().please help me out here? 我可以使用ftp_size连接到ftp服务器找到文件的大小,但是当我同时使用ftp_get和ftp_fget下载文件时,文件为空。我什至看不到使用ftp_nlist()的目录列表。请在这里帮助我吗?

Since PHP is a server-side language, the files you get using FTP_get() will end up on the server that is running the PHP script. 由于PHP是一种服务器端语言,因此使用FTP_get()获得的文件将最终存储在运行PHP脚本的服务器上。 You need to make sure that the directory on your server that is receiving the files has proper write permissions. 您需要确保服务器上正在接收文件的目录具有适当的写权限。 I suggest CHMOD the dir to 777 to make sure that it works. 我建议将目录更改为777,以确保它能正常工作。

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

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