nw/sftp-bundle
最新稳定版本:v1.1
Composer 安装命令:
composer require nw/sftp-bundle
包简介
This bundle provide quite simple functions for interact with SFTP servers
README 文档
README
SFTP Bundle
This bundle provides a simple interface for transfer files by SFTP protocol.
Installation
- Install the bundle using Composer:
composer require nw/sftp-bundle
- Enable bundle in
AppKernel.php
class AppKernel extends Kernel { public function registerBundles() { return array( // ... other bundles new NW\SFTPBundle\NWSFTPBundle() ); } }
Usage
- Connect to the SFTP server:
$sftp = $this->get('nw.sftp'); $sftp->connect($host, $port); $sftp->login($username, $password); // or $sftp->loginWithKey($host, $username, $pubkeyfile, $privkeyfile, $passphrase = null);
- Use SFTP client to transfer files:
$sftp->fetch('/path/to/remoteFile', '/path/to/localFile'); // or $sftp->send('/path/to/localFile', '/path/to/remoteFile');
- From CLI could be used one of the following commands:
app/console nw:sftp:fetch /path/to/remoteFile /path/to/localFile # - copy files from a remote server to the local machine # or app/console nw:sftp:send /path/to/localFile /path/to/remoteFile # - copy files from a local machine to the remote server
统计信息
- 总下载量: 1.78k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-12-22