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

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

lihaijiang/aliyun-itxdl-oss
===========================

阿里云oss

2.0(8y ago)015MITPHPPHP &gt;=5.6.0

Since Jan 22Pushed 8y agoCompare

[ Source](https://github.com/lihaijiang123/aliyun-itxdl-oss)[ Packagist](https://packagist.org/packages/lihaijiang/aliyun-itxdl-oss)[ RSS](/packages/lihaijiang-aliyun-itxdl-oss/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (3)Used By (0)

安装
--

[](#安装)

安装有两种方式：

### 1. 执行命令安装

[](#1-执行命令安装)

运行命令：

```
composer require lihaijiang/aliyun-itxdl-oss:~2.0
```

### 2. 直接编辑配置文件

[](#2-直接编辑配置文件)

将以下内容增加到 composer.json：

```
require: {
    "lihaijiang/aliyun-itxdl-oss": "2.0"
}
```

然后运行 `composer update`。

### 构建 Service 文件

[](#构建-service-文件)

新建 `app/services/OSS.php`，内容可参考：(aliyun-oss/src/oss/AliyunOSS.php)，然后修改配置：

```
... ...

  private $city = '北京';

  private $networkType = '经典网络';

  private $AccessKeyId = '';
  private $AccessKeySecret = '';

... ...
```

### 放入自动加载

[](#放入自动加载)

#### 遵循 psr-0 的项目（如Laravel 4、CodeIgniter、TinyLara）中：

[](#遵循-psr-0-的项目如laravel-4codeignitertinylara中)

在 `composer.json` 中 `autoload -> classmap` 处增加配置：

```
"autoload": {
    "classmap": [
      "app/services"
    ]
  }
```

然后运行 `composer dump-autoload`。

#### 遵循 psr-4 的项目（如 Laravel 5、Symfony）中：

[](#遵循-psr-4-的项目如-laravel-5symfony中)

无需配置，保证目录 `App/Services` 和命名空间 `namespace App\Services;` 一致即可自动加载。

### 使用

[](#使用)

```
use App\Services\OSS;

// 在外网上传一个文件并指定 options 如：Content-Type 类型
// 更多 options 见：https://github.com/LiHaijiang/AliyunOSS/blob/master/src/oss/src/Aliyun/OSS/OSSClient.php#L142-L148
OSS::publicUpload('bucket', '目标 object 名', '本地文件路径', [
    'ContentType' => 'application/pdf',
    ... ...
]);
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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 ~0 days

Total

2

Last Release

3082d ago

Major Versions

1.0 → 2.02018-01-22

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10512929?v=4)[lihaijiang](/maintainers/lihaijiang)[@lihaijiang](https://github.com/lihaijiang)

---

Tags

aliyunossAliyunOSSitxdl

### Embed Badge

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

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

###  Alternatives

[johnlui/aliyun-oss

阿里云 OSS 官方 SDK 的 Composer 封装，支持任何 PHP 项目，包括 Laravel、Symfony、TinyLara 等等。

488179.3k6](/packages/johnlui-aliyun-oss)[jacobcyl/ali-oss-storage

aliyun oss filesystem storage for laravel 5+

523570.9k7](/packages/jacobcyl-ali-oss-storage)[alphasnow/aliyun-oss-laravel

alibaba cloud object storage service for laravel

183272.9k4](/packages/alphasnow-aliyun-oss-laravel)[johnlui/aliyun-oss-laravel7

阿里云 OSS 官方 SDK 的 Composer 封装，支持任何 PHP 项目，包括 Laravel、Symfony、TinyLara 等等。

348.1k1](/packages/johnlui-aliyun-oss-laravel7)[alphasnow/aliyun-oss-flysystem

Flysystem adapter for the Aliyun storage

14270.2k8](/packages/alphasnow-aliyun-oss-flysystem)[summergeorge/ali-oss-storage

aliyun oss filesystem storage for laravel 5+

3915.5k](/packages/summergeorge-ali-oss-storage)

PHPackages © 2026

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