PHP code example of jackyliu / ftp

1. Go to this page and download the library: Download jackyliu/ftp library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jackyliu / ftp example snippets


Config::set('ftp.connections.key', array(
           'host'   => '',
           'username' => '',
           'password'   => '',
           'passive'   => false,
));

FTP::connection()->getDirListing(...);

FTP::connection('foo')->getDirListing(...);

FTP::reconnect('foo');

FTP::disconnect('foo');

// With custom connection
$listing = FTP::connection('my-ftp-connection')->getDirListing();

// with default connection
$listing = FTP::connection()->getDirListing();
$status = FTP::connection()->makeDir('directory-name');