suixz / flysystem-curlftp
Flysystem 适配器,支持使用 cURL 实现的 FTP
v2.0.0
2018-10-15 07:56 UTC
Requires
- php: >=5.5.9
- ext-curl: *
- ext-intl: *
- league/flysystem: ^1.0
Requires (Dev)
- fzaninotto/faker: ^1.6
- larapack/dd: ^1.1
- phpunit/phpunit: ^4
- sllh/php-cs-fixer-styleci-bridge: ^2.1
README
此包包含一个基于 Flysystem 的 FTP 适配器,使用 cURL 实现。它支持显式和隐式 SSL 连接。
安装
您可以通过 composer 安装此包
composer require vladimir-yuldashev/flysystem-curlftp
使用
use League\Flysystem\Filesystem; use VladimirYuldashev\Flysystem\CurlFtpAdapter; $adapter = new CurlFtpAdapter([ 'host' => 'ftp.example.com', 'username' => 'username', 'password' => 'password', /** optional config settings */ 'port' => 21, 'root' => '/path/to/root', 'utf8' => true, 'ssl' => true, 'timeout' => 90, // connect timeout 'sslVerifyPeer' => 0, // using 0 is insecure, use it only if you know what you're doing 'sslVerifyHost' => 0, // using 0 is insecure, use it only if you know what you're doing /** proxy settings */ 'proxyHost' => 'proxy-server.example.com', 'proxyPort' => 80, 'proxyUsername' => 'proxyuser', 'proxyPassword' => 'proxypassword', ]); $filesystem = new Filesystem($adapter);
测试
$ composer test
安全
如果您发现任何安全相关的问题,请通过电子邮件 misterio92@gmail.com 反馈,而不是使用问题跟踪器。
许可协议
MIT 许可协议(MIT)。有关更多信息,请参阅 许可文件。