Welcome Guest, Not a member yet? Register   Sign In
FTP download issues Version 2.0.2
#1

[eluser]Unknown[/eluser]
I'm having issues downloading files using the FTP class.

If I use this code:

Code:
$config['hostname'] = 'hostname'; //Filled out with the correct info
$config['username'] = 'username'; //Filled out with the correct info
$config['password'] = 'password'; //Filled out with the correct info
$config['debug'] = TRUE;

$this->ftp->connect($config);

$list = $this->ftp->list_files('/path/html/');

print_r($list);

It displays:

Code:
Array ([0] => /path/html/robots.txt)

Now if I try to download using this code:

Code:
$this->ftp->download('/path/html/robots.txt', '/Users/ibjmedia/Desktop/');

I get an error:

Quote:An Error Was Encountered
Unable to download the specified file. Please check your path.

I'm on a Mac and this is the full location to my Desktop. So I'm not sure what's not working.

Any advice?

Thanks.
#2

[eluser]Stolz[/eluser]
Ty with the full path (including file name) in the destination path:

Code:
$this->ftp->download('/path/html/robots.txt', '/Users/ibjmedia/Desktop/robots.txt');
#3

[eluser]Unknown[/eluser]
So simple... Thank you.




Theme © iAndrew 2016 - Forum software by © MyBB