I have successfully connected to my FTP using PHP and I can see all the files using: ftp_nlist
But, is there an easy way to then download all these files in the current directory?
I can't see to find any examples of how I'd do this.
Thanks
Another simple solution is ....
List the files in an array and download each file individually.
Something like:
$contents = ftp_nlist($conn_id, ".");
foreach ($contents as &$value) { $result = ftp_fget($conn_id, $local,&$value, FTP_BINARY); }
You might need to tweak the code a little...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With