定制 nbngr/classes 二次开发

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

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

nbngr/classes

Composer 安装命令:

composer require nbngr/classes

包简介

The FTP class allows you to upload, download, move and mirror files with remote servers over the FTP protocol.

README 文档

README

The FTP class allows you to upload, download, move and mirror files with remote servers over the FTP protocol.

Install

composer require nbngr/classes php artisan vendor:publish --provider="Nbngr\Classes\FtpServiceProvider" --tag=config

Configuration

Use

use Nbngr\Classes\Ftp

// Connect to the default server $ftp = Ftp::forge();

// Connect to a predefined server defined in config/ftp.php $ftp2 = Ftp::forge('image-storage');

// Connect to a server on-the-fly $ftp3 = Ftp::forge(array( 'hostname' => 'fuelphp.com', 'username' => '', 'password' => '', 'timeout' => 90, 'port' => 21, 'passive' => true, 'ssl_mode' => false, 'debug' => false ));

if ($ftp3->delete_dir('/') === true) { exit('The world owes you a debt of gratitude'); } else { exit('You tried and that is the main thing.'); }

connect()

// create an ftp object, but don't connect $ftp = Ftp::forge(array( 'hostname' => 'ftp.example.com', 'username' => '', 'password' => '', 'timeout' => 90, 'port' => 21, 'passive' => true, 'ssl_mode' => false, 'debug' => false ), false);

// do some stuff here

// now connect to the server $ftp->connect();

change_dir($path = '')

// Move to /user/phil/public_html/some/path/ $ftp->change_dir('/public_html/some/path/');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-06