PHPackages                             xiaoheiba/qiniu - 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. xiaoheiba/qiniu

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

xiaoheiba/qiniu
===============

Qiniu Resource (Cloud) Storage SDK for PHP

v7.5.0(4y ago)08MITPHPPHP &gt;=5.3.3

Since Oct 9Pushed 4y agoCompare

[ Source](https://github.com/xiaoheiba/qiniu)[ Packagist](https://packagist.org/packages/xiaoheiba/qiniu)[ Docs](http://developer.qiniu.com/)[ RSS](/packages/xiaoheiba-qiniu/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (39)Used By (0)

Qiniu Cloud SDK for PHP
=======================

[](#qiniu-cloud-sdk-for-php)

安装
--

[](#安装)

- 推荐使用 `composer` 进行安装。可以使用 composer.json 声明依赖，或者运行下面的命令。SDK 包已经放到这里 \[`qiniu/php-sdk`\]\[install-packagist\] 。

```
$ composer require xiaoheiba/qiniu
```

- 直接下载安装，SDK 没有依赖其他第三方库，但需要参照 composer 的 autoloader，增加一个自己的 autoloader 程序。

运行环境
----

[](#运行环境)

Qiniu SDK版本PHP 版本7.xcURL extension, 5.3 - 5.6,7.06.xcURL extension, 5.2 - 5.6使用方法
----

[](#使用方法)

### 上传

[](#上传)

```
use Qiniu\Storage\UploadManager;
use Qiniu\Auth;
...
    $uploadMgr = new UploadManager();
    $auth = new Auth($accessKey, $secretKey);
    $token = $auth->uploadToken($bucket);
    list($ret, $error) = $uploadMgr->putFile($token, 'key', 'filePath');
...
```

测试
--

[](#测试)

```
$ ./vendor/bin/phpunit tests/Qiniu/Tests/
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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

Every ~84 days

Recently: every ~68 days

Total

38

Last Release

1485d ago

Major Versions

v6.1.13 → v7.0.02015-03-01

PHP version history (2 changes)v6.1.3PHP &gt;=5.2.4

v7.0.0PHP &gt;=5.3.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/49095824d5fff1331119d4c1fd0e89ff33107c3791739a2e77f201182318a1b2?d=identicon)[xiaoheiba](/maintainers/xiaoheiba)

---

Top Contributors

[![rwifeng](https://avatars.githubusercontent.com/u/1814146?v=4)](https://github.com/rwifeng "rwifeng (212 commits)")[![longbai](https://avatars.githubusercontent.com/u/1204301?v=4)](https://github.com/longbai "longbai (154 commits)")[![ankadada](https://avatars.githubusercontent.com/u/26298506?v=4)](https://github.com/ankadada "ankadada (112 commits)")[![jemygraw](https://avatars.githubusercontent.com/u/1751166?v=4)](https://github.com/jemygraw "jemygraw (71 commits)")[![xushiwei](https://avatars.githubusercontent.com/u/396972?v=4)](https://github.com/xushiwei "xushiwei (70 commits)")[![timhbw](https://avatars.githubusercontent.com/u/13515277?v=4)](https://github.com/timhbw "timhbw (62 commits)")[![dtynn](https://avatars.githubusercontent.com/u/1426666?v=4)](https://github.com/dtynn "dtynn (37 commits)")[![okbang9](https://avatars.githubusercontent.com/u/84362092?v=4)](https://github.com/okbang9 "okbang9 (36 commits)")[![longshanksmo](https://avatars.githubusercontent.com/u/2968746?v=4)](https://github.com/longshanksmo "longshanksmo (17 commits)")[![Mei-Zhao](https://avatars.githubusercontent.com/u/8233255?v=4)](https://github.com/Mei-Zhao "Mei-Zhao (16 commits)")[![xwen-winnie](https://avatars.githubusercontent.com/u/10482947?v=4)](https://github.com/xwen-winnie "xwen-winnie (10 commits)")[![lihsai0](https://avatars.githubusercontent.com/u/17806506?v=4)](https://github.com/lihsai0 "lihsai0 (10 commits)")[![bachue](https://avatars.githubusercontent.com/u/321962?v=4)](https://github.com/bachue "bachue (5 commits)")[![netroby](https://avatars.githubusercontent.com/u/154278046?v=4)](https://github.com/netroby "netroby (3 commits)")[![xiaoheiba](https://avatars.githubusercontent.com/u/61656077?v=4)](https://github.com/xiaoheiba "xiaoheiba (3 commits)")[![callmez](https://avatars.githubusercontent.com/u/1625891?v=4)](https://github.com/callmez "callmez (3 commits)")[![peichao01](https://avatars.githubusercontent.com/u/844740?v=4)](https://github.com/peichao01 "peichao01 (2 commits)")[![5-say](https://avatars.githubusercontent.com/u/6258835?v=4)](https://github.com/5-say "5-say (2 commits)")[![JellyBool](https://avatars.githubusercontent.com/u/6011686?v=4)](https://github.com/JellyBool "JellyBool (2 commits)")[![hantuo](https://avatars.githubusercontent.com/u/873728?v=4)](https://github.com/hantuo "hantuo (2 commits)")

---

Tags

sdkcloudstorageqiniu

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[qiniu/php-sdk

Qiniu Resource (Cloud) Storage SDK for PHP

8483.0M240](/packages/qiniu-php-sdk)[zgldh/qiniu-laravel-storage

Qiniu Resource (Cloud) Storage SDK for Laravel 5/6/7/8/9

530394.0k14](/packages/zgldh-qiniu-laravel-storage)[itbdw/laravel-storage-qiniu

A storage library for laravel5 and qiniu sdk

7015.2k](/packages/itbdw-laravel-storage-qiniu)

PHPackages © 2026

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