PHPackages                             shaozeming/aliyun-oss - 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. shaozeming/aliyun-oss

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

shaozeming/aliyun-oss
=====================

继承阿里云Oss composer 包最新版本进行封装的composer package，整理配置便于管理

v1.0.0(7y ago)42.4kMITPHPCI failing

Since Mar 12Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ShaoZeMing/Aliyun-Oss)[ Packagist](https://packagist.org/packages/shaozeming/aliyun-oss)[ RSS](/packages/shaozeming-aliyun-oss/feed)WikiDiscussions master Synced yesterday

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

Aliyun Oss for PHP
==================

[](#aliyun-oss-for-php)

---

[![](https://camo.githubusercontent.com/9a15bc9e98ecc4d9ab0ad758e61c8d343b672a58ff0fac903cd0e01389313ac1/68747470733a2f2f7472617669732d63692e6f72672f5368616f5a654d696e672f416c6979756e2d4f73732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ShaoZeMing/Aliyun-Oss)[![](https://camo.githubusercontent.com/b696596e9add2d756656b3d0d95eb25b413b5799d0839140b7d1d50a1aeb85c9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f5368616f5a654d696e672f616c6979756e2d6f73732e737667)](https://packagist.org/packages/shaozeming/aliyun-oss)[![](https://camo.githubusercontent.com/f6f4e686faa511de559f93b75c9bba4607aeb28004b3da45f0a0ddfe79290c0e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f5368616f5a654d696e672f616c6979756e2d6f73732e737667)](https://packagist.org/packages/stichoza/shaozeming/aliyun-oss)

同胞兄弟
----

[](#同胞兄弟)

- [ShaoZeMing/aliyun-vod](https://github.com/ShaoZeMing/Aliyun-Vod) 阿里云点播
- [ShaoZeMing/aliyun-sts](https://github.com/ShaoZeMing/Aliyun-Sts) 阿里云STS
- [ShaoZeMing/aliyun-core](https://github.com/ShaoZeMing/Aliyun-Core) 阿里云接口Core核心包
- [ShaoZeMing/aliyun-oss](https://github.com/ShaoZeMing/Aliyun-Oss) 阿里云OSS
- 待续...

Installing
----------

[](#installing)

```
$ composer require shaozeming/aliyun-oss -v
```

### configuration

[](#configuration)

拷贝项目下`src/config.php`到你项目中，进行配置其中oss。

配置示例代码：

```
return [

       /**
        * oss 配置
        */
       'oss' => [
           'AccessKeyID' => 'LT********cgJFsp',
           'AccessKeySecret' => 'fNcK*************d6Gn',
           'endpoint' => 'oss-cn-beijing.aliyuncs.com',
           'bucket' => 'miji***a365',  //
           'is_cname' => false,  // 是否使用自己绑定域名
           'is_ssl' => false,  // 是否使用https
           'timeout' => 3600,  // 授权访问默认时间
       ]
];
```

Example
-------

[](#example)

> - 由于官方提供了composer 包，本包只对配置文件进行统一整理，和其他几个项目共同配置，并继承了官方核心服务接口，你可以参考官方文档对应方法使用。
> - 对照官方文档地址：[https://help.aliyun.com/document\_detail/32101.html?spm=a2c4g.11174283.6.749.32877da2BkSiov](https://help.aliyun.com/document_detail/32101.html?spm=a2c4g.11174283.6.749.32877da2BkSiov)

```
use ShaoZeMing\AliOss\Services\OSSService;

           try {
                    $oss = new OSSService($config);
                    $result =  $oss->createBucket('shaozeming'); // 创建Bucket

                  //  $bucket= " ";
                  //  $object = "";
                  //  $content = "Hi, OSS.";
                  //  $result =  $oss->putObject($bucket,$object,$content); // 上传文件
                  //  .....
                    print_r($result);
                    return $result;
                } catch (OssException $e) {
                     $err = "Error : 错误：" . $e->getMessage();
                     echo $err . PHP_EOL;
                 } catch (\Exception $e) {
        //
                    $err = "Error : 错误：" . $e->getMessage();
                    echo $err . PHP_EOL;

                }

```

License
-------

[](#license)

MIT

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

2671d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/27b8938a70163fe95a1bea9ead4bfa7386b3fef2e00dd6c55bc1b3a20351fc72?d=identicon)[ShaoZeMing](/maintainers/ShaoZeMing)

---

Top Contributors

[![ShaoZeMing](https://avatars.githubusercontent.com/u/19376576?v=4)](https://github.com/ShaoZeMing "ShaoZeMing (8 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shaozeming-aliyun-oss/health.svg)

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

###  Alternatives

[jacobcyl/ali-oss-storage

aliyun oss filesystem storage for laravel 5+

537573.2k7](/packages/jacobcyl-ali-oss-storage)[iidestiny/flysystem-oss

Flysystem adapter for the Oss storage.

96640.6k29](/packages/iidestiny-flysystem-oss)[xxtime/flysystem-aliyun-oss

AliYun OSS adapter for flysystem. Support PHP8. aliyuncs/oss-sdk-php ~2.6

54523.9k30](/packages/xxtime-flysystem-aliyun-oss)[apollopy/flysystem-aliyun-oss

This is a Flysystem adapter for the Aliyun OSS ~2.3

94128.2k3](/packages/apollopy-flysystem-aliyun-oss)[yangyifan/upload

上传 SDK for Laravel

12422.7k3](/packages/yangyifan-upload)[alphasnow/aliyun-oss-flysystem

Flysystem adapter for the Aliyun storage

14282.5k9](/packages/alphasnow-aliyun-oss-flysystem)

PHPackages © 2026

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