PHPackages                             juju/ftp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. juju/ftp

ActiveLibrary[File &amp; Storage](/categories/file-storage)

juju/ftp
========

ftp功能

v1.0.0(9y ago)02MITPHPPHP &gt;=5.4.0

Since Aug 16Pushed 9y ago1 watchersCompare

[ Source](https://github.com/juju031/yii2_ftp)[ Packagist](https://packagist.org/packages/juju/ftp)[ RSS](/packages/juju-ftp/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (1)Versions (2)Used By (0)

\##FTP for Yii2 ##安装

```
composer require "juju/ftp:1.0"

"juju/ftp": "~1.0.0"

```

\##控制器

```
use \juju\ftp\FtpClient;
$ftp = new FtpClient();
$ftp->connect($host);
$ftp->login($login, $password);

or

$ftp = new FtpClient();
$ftp->connect($host, true, 22);
$ftp->login($login, $password);

$local_file = dirname(Yii::$app->BasePath)."/LICENSE.md";
$result = $ftp->putFromPath($local_file);

$ftp->putAll($source_directory, $target_directory);

$ftp->putAll($source_directory, $target_directory, FTP_BINARY);

$ftp->putAll($source_directory, $target_directory, FTP_ASCII);

$size = $ftp->dirSize();

$size = $ftp->dirSize('/path/of/directory');

$total = $ftp->count();

$total = $ftp->count('/path/of/directory');

$total_file = $ftp->count('.', 'file');

$total_file = $ftp->count('/path/of/directory', 'file');

$total_dir = $ftp->count('/path/of/directory', 'directory');

$total_link = $ftp->count('/path/of/directory', 'link');

$items = $ftp->scanDir();

var_dump($ftp->scanDir('.', true));

$ftp->exec($command);

$ftp->pasv(true);

$ftp->chmod('0777', 'file.php');

$ftp->rmdir('path/of/directory/to/remove');

$ftp->rmdir('path/of/directory/to/remove', true);

$ftp->mkdir('path/of/directory/to/create');

$ftp->mkdir('path/of/directory/to/create', true);

```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3606d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4664c19bdace38e7bebaf8efa88fa6fd2d0f26367701713a9ccd8090a905aa4e?d=identicon)[juju](/maintainers/juju)

---

Top Contributors

[![juju031](https://avatars.githubusercontent.com/u/15888494?v=4)](https://github.com/juju031 "juju031 (7 commits)")

---

Tags

ftphelpersftpserverfilesslyii2extensionlibssl-ftp

### Embed Badge

![Health badge](/badges/juju-ftp/health.svg)

```
[![Health](https://phpackages.com/badges/juju-ftp/health.svg)](https://phpackages.com/packages/juju-ftp)
```

###  Alternatives

[nicolab/php-ftp-client

A flexible FTP and SSL-FTP client for PHP. This lib provides helpers easy to use to manage the remote files.

6435.6M27](/packages/nicolab-php-ftp-client)[yii2mod/yii2-ftp

A flexible FTP and SSL-FTP client for PHP. This lib provides helpers easy to use to manage the remote files.

32446.1k3](/packages/yii2mod-yii2-ftp)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M63](/packages/creocoder-yii2-flysystem)[nemmo/yii2-attachments

Extension for file uploading and attaching to the models

6416.7k5](/packages/nemmo-yii2-attachments)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
