ajenguianis/ftp-sftp-connector
最新稳定版本:v1.2.0
Composer 安装命令:
composer require ajenguianis/ftp-sftp-connector
包简介
Library to connect to a distant server with ftp or sftp protocol.
README 文档
README
Welcome to the PHP FTP and SFTP Client Connector Library! This library simplifies FTP and SFTP protocol operations, making it easy to manage remote files and establish distant server connections. Whether you need basic file transfers or more advanced functionality, this library has you covered.
Key Features
-
User-Friendly Assistance: This library offers easy-to-use helper functions for handling remote files and establishing distant server connections.
-
Emphasis on Simplicity and Efficiency: We've designed this package to be lightweight. It acts as a convenient layer on top of PHP's native FTP and SFTP protocol capabilities, enriched with helpful utilities.
-
Customization Options: Advanced users can personalize functionality by inheriting from one of the two classes SftpClientConnector and FtpClientConnector included in the package.
Getting Started
To get started with our library, you can install it via Composer:
composer require ajenguianis/ftp-sftp-connector
Usage
Connexion
Connect to ftp or SFTP server:
$connector= new \AA\ServerConector\Connector();
//set protocol ftp or sftp
$connector->setProtocol('ftp');
$connector->setUp($host, $login, $password, $port);
$connector->connect();
Download file
/**
* @param $localFile
* @param $remoteFile
* @param $mode
* @return bool|string
*/
$connector->downloadFile($localFile,$remoteFil, $mode);
Get files list
$connector->nlist($directory,$recursive);
Get files by extension
$connector->getByExtension($directory,$recursive,$extension);
Archive file
$connector->archive($fileFrom, $fileTo);
统计信息
- 总下载量: 25
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-09-03