定制 avv/sftp-flybridge 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

avv/sftp-flybridge

最新稳定版本:v1.0.0

Composer 安装命令:

composer require avv/sftp-flybridge

包简介

A robust bridge to connect to SFTP servers using Flysystem v3.

README 文档

README

CI PHPStan

Effortlessly connect your PHP project with Flysystem SFTP using SFTP FLYBRIDGE. This package provides a seamless way to interact with remote SFTP servers, supporting both environment variables and manual configuration for maximum flexibility.

🚀 Features

Simple Configuration – Use .env or pass an array with credentials.
Secure & Fast – Built on Flysystem with best SFTP practices.
Flexible & Extensible – Supports custom root paths, ports, and timeouts.
PHP 8.1+ Compatibility – Modern, efficient, and optimized for performance.

📦 Installation

Install via Composer:

composer require avv/sftp-flybridge

⚙️ Configuration

You can configure SFTP FLYBRIDGE using environment variables or by passing an array to the constructor.

🔹 Option 1: Using .env

I recommend add your SFTP credentials to the .env file:

SFTP_HOST=sftp.example.com
SFTP_USERNAME=your_user
SFTP_PASSWORD=your_password
SFTP_PORT=22
SFTP_ROOT=/home/your_user/
SFTP_TIMEOUT=10

Then initialize the class:

use FlyBridge\SftpStorage;

$sftp = new SftpStorage();

🔹 Option 2: Passing Configuration Manually

$sftp = new SftpStorage([
    'host' => 'sftp.example.com',
    'username' => 'your_user',
    'password' => 'your_password',
    'port' => 22,
    'root' => '/home/your_user/',
    'timeout' => 10,
]);

📜 Usage Examples

Upload a File

$sftp->write('backup.sql', file_get_contents('local_backup.sql'));

Read a File

$content = $sftp->read('backup.sql');
echo $content;

Delete a File

$sftp->delete('backup.sql');

🧪 Testing

composer install
composer test
composer analyse

🤝 Contributing

See CONTRIBUTING.md for guidelines.

🎯 Why Choose SFTP FLYBRIDGE?

🚀 Easy Setup – Just install & configure!
🔒 Secure – Uses Flysystem’s best SFTP practices.
Optimized – Lightweight and fast.

📄 License

MIT License. Free to use and modify.

Made with ❤️ by AVV

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固