\ DriveHQ Customer Support Forum \
Đã đọc/Trả lời : 30224/2
  • whiteredxgh
  • (2bài đăng)

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 


01/01/2019 8:07:05 SA

  • whiteredxgh
  • (2bài đăng)
Chủ thể: 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. 


Hồi đáp
17/01/2019 11:19:57 SA

  • Annelot
  • (1bài đăng)
Chủ thể: 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, '.');

Hồi đáp
06/03/2020 5:06:05 SA

Đánh dấu trang & Chia sẻ
Trả lời nhanh

Leading Cloud Surveillance service

Leading Enterprise Cloud IT Service Since 2003