PHPackages                             fastdfs/fastdfs - 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. fastdfs/fastdfs

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

fastdfs/fastdfs
===============

3108PHP

Since Jan 21Pushed 10y ago1 watchersCompare

[ Source](https://github.com/glary789/PHP-FastDFS-Client)[ Packagist](https://packagist.org/packages/fastdfs/fastdfs)[ RSS](/packages/fastdfs-fastdfs/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP-FastDFS-Client
==================

[](#php-fastdfs-client)

用PHP Socket 实现的 FastDFS 客户端. 目前支持版本为 FastDFS 4.06

实现功能：

```
/**
 * 根据GroupName申请Storage地址
 *
 * @command 104
 * @param string $group_name 组名称
 * @return array/boolean
 */

 FastDFS_Tracker::applyStorage($group_name)

/**
 * 上传文件
 *
 * @command 11
 * @param char $index 索引
 * @param string $filename
 * @param string $文件扩展名
 * @return array
 */

 FastDFS_Storage::uploadFile($index, $filename, $ext = '')

/**
 * 上传Slave文件
 *
 * @command 21
 * @param string $filename 待上传的文件名称
 * @param string $master_file_path 主文件名称
 * @param string $prefix_name 后缀的前缀名
 * @param string $ext 后缀名称
 * @return array/boolean
 */

 FastDFS_Storage::uploadSlaveFile($filename, $master_file_path, $prefix_name, $ext = '')

/**
 * 删除文件
 *
 * @command 12
 * @param string $group_name 组名称
 * @param string $file_path 文件路径
 * @return boolean 删除成功与否
 */

 FastDFS_Storage::deleteFile($group_name, $file_path)

/**
 * 获取文件元信息
 *
 * @command 15
 * @param string $group_name 组名称
 * @param string $file_path 文件路径
 * @return array 元信息数组
 */

 FastDFS_Storage::getFileMetaData($group_name, $file_path)

/**
 * 设置文件元信息
 *
 * @command 13
 * @param string $group_name 组名称
 * @param string $file_path 文件路径
 * @param array $meta_data 元信息数组
 * @return boolean 设置成功与否
 */

 FastDFS_Storage::setFileMetaData($group_name, $file_path, array $meta_data, $flag =  FDFS_OVERWRITE_METADATA)

/**
 * 下载文件(不建议对大文件使用)
 *
 * @command 14
 * @param string $group_name 组名称
 * @param string $file_path 文件路径
 * @param int $offset 下载文件偏移量
 * @param int $length 下载文件大小
 * @return string 文件内容
 */

 FastDFS_Storage::downloadFile($group_name, $file_path, $offset = 0, $length = 0)

/**
 * 检索文件信息
 *
 * @command 22
 * @param string $group_name 组名称
 * @param string $file_path 文件路径
 * @return array
 */

 FastDFS_Storage::getFileInfo($group_name, $file_path)

```

TODO LIST: 上传可更新文件: uploadAppenderFile() 附加可更新文件信息: appendFile()

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.6% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b99ed11c20f9b8559d6fc96912c30f379a90b9ea3b7493920b8100e518619468?d=identicon)[glary](/maintainers/glary)

---

Top Contributors

[![qpwoeiru96](https://avatars.githubusercontent.com/u/863582?v=4)](https://github.com/qpwoeiru96 "qpwoeiru96 (11 commits)")[![glary789](https://avatars.githubusercontent.com/u/5266653?v=4)](https://github.com/glary789 "glary789 (2 commits)")[![DeChaosLib](https://avatars.githubusercontent.com/u/109447596?v=4)](https://github.com/DeChaosLib "DeChaosLib (1 commits)")

### Embed Badge

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

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

###  Alternatives

[venveo/craft-compress

Create smart zip files from Craft assets on the fly

124.7k](/packages/venveo-craft-compress)

PHPackages © 2026

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