\ DriveHQ Customer Support Forum \
已读/回复 : 29266/2
  • whiteredxgh
  • (2帖子)

I would need to download a file over FTP from DriveHQ but it always doesnt have permissions could someone help me with that? I verified that both my ftp password and username are correct 


2019/1/1 8:07:05

  • whiteredxgh
  • (2帖子)
主题: Re:How can I download a File through FTP in PHP

If you try to download a file from a folder shared to you by another user, please make sure that folder is still shared to you, and that the folder was shared with Download or a higher level permission.

If you try to download a file from your own account, there should be no permission issue at all. Please verify that you can download files using FileZilla first and check if your code is sending the same (or similar) FTP commands. We usually don't support your own code or custom software. But if you have a business level subscription, you can try to send an email to DriveHQ customer support. 


回复
2019/1/17 11:19:57

  • Annelot
  • (1帖子)
主题: Re:How can I download a File through FTP in PHP

This will work - :)         

 

$conn = ftp_ssl_connect(IMG_FTP_HOST);

 
if(!$conn)
{
exit("Can not connect to server: ".IMG_FTP_HOST."\n");
}
 
if(!ftp_login($conn,IMG_FTP_USERNAME,IMG_FTP_PASSWORD))
{
ftp_quit($conn);
exit("Can't login\n");
}
 
ftp_set_option($conn, FTP_USEPASVADDRESS, false); // set ftp option
 
ftp_pasv($conn, true); //make connection to passive mode
 
ftp_chdir($conn,$DIR);
 
$files = ftp_nlist($conn, '.');

回复
2020/3/6 5:06:05

收藏并分享
快速回复

请 登录 回复如下: 还不是DriveHQ会员?


Leading Cloud Surveillance service

Leading Enterprise Cloud IT Service Since 2003