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

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

feicanfly/aliyun-oss
====================

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

v1.3.4(9y ago)030MITPHPPHP &gt;=5.4.0

Since Jan 9Pushed 9y ago1 watchersCompare

[ Source](https://github.com/feicanfly/AliyunOSS)[ Packagist](https://packagist.org/packages/feicanfly/aliyun-oss)[ Docs](https://github.com/johnlui/AliyunOSS)[ RSS](/packages/feicanfly-aliyun-oss/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (9)Used By (0)

AliyunOSS
---------

[](#aliyunoss)

> 最近更新：AliyunOSS v1.3 发布，增加删除、复制、移动文件功能。

```
    ___     __    _                                    ____    _____   _____
   /   |   / /   (_)   __  __  __  __   ____          / __ \  / ___/  / ___/
  / /| |  / /   / /   / / / / / / / /  / __ \        / / / /  \__ \   \__ \
 / ___ | / /   / /   / /_/ / / /_/ /  / / / /       / /_/ /  ___/ /  ___/ /
/_/  |_|/_/   /_/    \__, /  \__,_/  /_/ /_/        \____/  /____/  /____/
                    /____/

```

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

更新记录
----

[](#更新记录)

- 2015-10-23 `Release v1.3` 增加删除、复制、移动文件功能。
- 2015-08-07 `Release v1.2` 修复内存泄露 bug。
- 2015-01-12 `Release v1.1` 增加内外网配置分离。
- 2015-01-09 `Release v1.0` 完善功能，增加 Laravel 框架详细使用教程及代码。

安装
--

[](#安装)

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

```
require: {
    "johnlui/aliyun-oss": "*"
}
```

然后运行 `composer update`。

使用（以 Laravel 为例）
----------------

[](#使用以-laravel-为例)

### 构建 Service 文件

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

新建 `app/services/OSS.php`，内容可参考：[OSSExample.php](https://github.com/johnlui/AliyunOSS/blob/master/OSSExample.php)：

```
