PHPackages                             limingxinleo/qiniu-php-sdk - 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. limingxinleo/qiniu-php-sdk

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

limingxinleo/qiniu-php-sdk
==========================

Qiniu Resource (Cloud) Storage SDK for PHP

v7.14.0(1w ago)158↑469%MITPHPPHP &gt;=5.3.3

Since Mar 12Pushed 1w agoCompare

[ Source](https://github.com/forkgroup/qiniu-php-sdk)[ Packagist](https://packagist.org/packages/limingxinleo/qiniu-php-sdk)[ Docs](http://developer.qiniu.com/)[ RSS](/packages/limingxinleo-qiniu-php-sdk/feed)WikiDiscussions master Synced today

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

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

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

[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)[![Build Status](https://camo.githubusercontent.com/0716037609186dc86c21a616c36cf13cb46dc3722f6bc5eda06f4760ae55ad1e/68747470733a2f2f7472617669732d63692e6f72672f71696e69752f7068702d73646b2e737667)](https://travis-ci.org/qiniu/php-sdk)[![GitHub release](https://camo.githubusercontent.com/b6a7699f9d3080f0430610a5e3c6159ac4a8e78b55e50608c41f045f2ae85929/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f71696e69752f7068702d73646b2e7376673f6c6162656c3d72656c65617365)](https://github.com/qiniu/php-sdk/releases)[![Latest Stable Version](https://camo.githubusercontent.com/23fe96e0ba3b7f87f976eab93d68da1d1bbe7c37f4c6107673b4ab7f65a1574d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f71696e69752f7068702d73646b2e737667)](https://packagist.org/packages/qiniu/php-sdk)[![Total Downloads](https://camo.githubusercontent.com/0590d6e0780bba87a4ff519d06031840c82d610ad352e769a941d9caa3564e9a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f71696e69752f7068702d73646b2e737667)](https://packagist.org/packages/qiniu/php-sdk)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/edfb018f799c4d2f9e81f43db5131f59f71e92451a06c111940d4e45f25f8dd3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f71696e69752f7068702d73646b2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/qiniu/php-sdk/?branch=master)[![Coverage Status](https://camo.githubusercontent.com/5e99b00abcbc429d098d848ed238366468435bcebe0910928e9301aa8d6e9284/68747470733a2f2f636f6465636f762e696f2f67682f71696e69752f7068702d73646b2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/qiniu/php-sdk)[![Join Chat](https://camo.githubusercontent.com/abe08b740a4156153736f791393ec4da6619c4be73212e75769f52edacc0e2b5/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667)](https://gitter.im/qiniu/php-sdk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)[![@qiniu on weibo](https://camo.githubusercontent.com/f67a25f2f7792badc2ab789499adb3840c96e19b7bec01db1f335730e3427df2/687474703a2f2f696d672e736869656c64732e696f2f62616467652f776569626f2d25343071696e697574656b2d626c75652e737667)](http://weibo.com/qiniutek)

安装
--

[](#安装)

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

```
$ composer require qiniu/php-sdk
```

运行环境
----

[](#运行环境)

Qiniu SDK版本PHP 版本7.xcURL extension, 5.3 - 5.6, 7.0 - 7.4, 8.0-8.16.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/
```

常见问题
----

[](#常见问题)

- `$error` 保留了请求响应的信息，失败情况下 `ret` 为 `none`, 将 `$error` 可以打印出来，提交给我们。
- API 的使用 demo 可以参考 [examples](https://github.com/qiniu/php-sdk/tree/master/examples)。

代码贡献
----

[](#代码贡献)

详情参考[代码提交指南](https://github.com/qiniu/php-sdk/blob/master/CONTRIBUTING.md)。

贡献记录
----

[](#贡献记录)

- [所有贡献者](https://github.com/qiniu/php-sdk/contributors)

联系我们
----

[](#联系我们)

- 如果需要帮助，请提交工单（在portal右侧点击咨询和建议提交工单，或者直接向  发送邮件）
- 如果有什么问题，可以到问答社区提问，[问答社区](https://qiniu.segmentfault.com/)
- 更详细的文档，见[官方文档站](https://developer.qiniu.com/)
- 如果发现了 bug， 欢迎提交 [issue](https://github.com/qiniu/php-sdk/issues)
- 如果有功能需求，欢迎提交 [issue](https://github.com/qiniu/php-sdk/issues)
- 如果要提交代码，欢迎提交 pull request
- 欢迎关注我们的[微信](https://www.qiniu.com/#weixin) [微博](https://weibo.com/qiniutek)，及时获取动态信息。

代码许可
----

[](#代码许可)

The MIT License (MIT).详情见 [License文件](https://github.com/qiniu/php-sdk/blob/master/LICENSE).

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance98

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

12d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/44228082?v=4)[Hyperf Community](/maintainers/hyperf)[@hyperf](https://github.com/hyperf)

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

---

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)")[![lihsai0](https://avatars.githubusercontent.com/u/17806506?v=4)](https://github.com/lihsai0 "lihsai0 (61 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)")[![Mei-Zhao](https://avatars.githubusercontent.com/u/8233255?v=4)](https://github.com/Mei-Zhao "Mei-Zhao (26 commits)")[![bachue](https://avatars.githubusercontent.com/u/321962?v=4)](https://github.com/bachue "bachue (22 commits)")[![longshanksmo](https://avatars.githubusercontent.com/u/2968746?v=4)](https://github.com/longshanksmo "longshanksmo (17 commits)")[![xwen-winnie](https://avatars.githubusercontent.com/u/10482947?v=4)](https://github.com/xwen-winnie "xwen-winnie (13 commits)")[![callmez](https://avatars.githubusercontent.com/u/1625891?v=4)](https://github.com/callmez "callmez (3 commits)")[![netroby](https://avatars.githubusercontent.com/u/154278046?v=4)](https://github.com/netroby "netroby (3 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)")[![peichao01](https://avatars.githubusercontent.com/u/844740?v=4)](https://github.com/peichao01 "peichao01 (2 commits)")[![limingxinleo](https://avatars.githubusercontent.com/u/16648551?v=4)](https://github.com/limingxinleo "limingxinleo (2 commits)")[![liangchaoboy](https://avatars.githubusercontent.com/u/17689793?v=4)](https://github.com/liangchaoboy "liangchaoboy (2 commits)")

---

Tags

sdkcloudstorageqiniu

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/limingxinleo-qiniu-php-sdk/health.svg)

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

###  Alternatives

[qiniu/php-sdk

Qiniu Resource (Cloud) Storage SDK for PHP

8473.0M226](/packages/qiniu-php-sdk)[zgldh/qiniu-laravel-storage

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

530391.9k12](/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)
