PHP code example of waljqiang / ftpclient

1. Go to this page and download the library: Download waljqiang/ftpclient 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/ */

    

waljqiang / ftpclient example snippets



use Nova\FtpClient\FtpClient;

try{
    $ftp = FtpClient::getInstance()->connect("127.0.0.1",21,"user","password",90,true);
    FtpClient::getInstance()->put("/11.txt",/fireware/12.txt");
    FtpClient::getInstance()->close();
}catch(\Exception $e){
    var_dump($e);
}


use Nova\FtpClient\FtpClient;

try{
    $ftp = FtpClient::getInstance()->connect("127.0.0.1",21,"user","password",90,true);
    FtpClient::getInstance()->puts("/11",/fireware");
    FtpClient::getInstance()->close();
}catch(\Exception $e){
    var_dump($e);
}


use Nova\FtpClient\FtpClient;

try{
    $ftp = FtpClient::getInstance()->connect("127.0.0.1",21,"user","password",90,true);
    FtpClient::getInstance()->get("/11.txt",/fireware/11.txt");
    FtpClient::getInstance()->close();
}catch(\Exception $e){
    var_dump($e);
}