nw/sftp-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nw/sftp-bundle

最新稳定版本:v1.1

Composer 安装命令:

composer require nw/sftp-bundle

包简介

This bundle provide quite simple functions for interact with SFTP servers

README 文档

README

SensioLabsInsight Scrutinizer Code Quality Build Status Maintainability

SFTP Bundle

This bundle provides a simple interface for transfer files by SFTP protocol.

Installation

  1. Install the bundle using Composer:
 composer require nw/sftp-bundle
  1. Enable bundle in AppKernel.php
class AppKernel extends Kernel
{
  public function registerBundles()
  {
      return array(
          // ... other bundles
          new NW\SFTPBundle\NWSFTPBundle()
       );
   }
}

Usage

  1. 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);
  1. Use SFTP client to transfer files:
    $sftp->fetch('/path/to/remoteFile', '/path/to/localFile');
    // or
    $sftp->send('/path/to/localFile', '/path/to/remoteFile');
  1. 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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-12-22