Skip to content

Commit

Permalink
Merge pull request #6 from rockuw/master
Browse files Browse the repository at this point in the history
Version => 2.0.1
  • Loading branch information
rockuw committed Dec 14, 2015
2 parents 5aabaa0 + 917ab7e commit 9cb7648
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 10 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# ChangeLog - Aliyun OSS SDK for PHP

## v2.0.1

* 增加对ListObjects/ListMultipartUploads时特殊字符的处理
* 提供接口获取OssException中的详细信息


## 2015.11.25

** 大版本升级,不再兼容以前接口,新版本对易用性做了很大的改进,建议用户迁移到新版本。 **
Expand All @@ -23,4 +29,4 @@

### 问题修复

* object名称校验不完备
* object名称校验不完备
32 changes: 25 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,34 @@
- PHP 5.3+
- cURL extension

> 提示:
> - Ubuntu下可以使用apt-get包管理器安装php的cURL扩展 `sudo apt-get install php5-curl`
提示:

- Ubuntu下可以使用apt-get包管理器安装php的cURL扩展 `sudo apt-get install php5-curl`

## 安装方法

- 通过composer,这是推荐的方式,可以使用composer.json 声明依赖,或者运行下面的命令
```bash
$ composer require aliyuncs/oss-sdk-php
```
1. 如果您通过composer管理您的项目依赖,可以在你的项目根目录运行:

$ composer require aliyuncs/oss-sdk-php

或者在你的`composer.json`中声明对Aliyun OSS SDK for PHP的依赖:

"require": {
"aliyuncs/oss-sdk-php": "~2.0"
}

- 下载SDK包安装, SDK没有依赖其他三方库,但需要参照代码根目录中的`autoloader.php`,增加一个自己的autoloader程序。
然后通过`composer install`安装依赖。composer安装完成后,在您的PHP代码中引入依赖即可:

require_once __DIR__ . '/vendor/autoload.php';

2. 您也可以直接下载已经打包好的[phar文件][releases-page],然后在你
的代码中引入这个文件即可:

require_once '/path/to/oss-sdk-php.phar';

3. 下载SDK源码,在您的代码中引入SDK目录下的`autoload.php`文件:

require_once '/path/to/oss-sdk/autoload.php';

## 快速使用

Expand Down Expand Up @@ -117,3 +133,5 @@ foreach($bucketList as $bucket) {
- [阿里云OSS官方论坛](http://bbs.aliyun.com)
- [阿里云OSS官方文档中心](http://www.aliyun.com/product/oss#Docs)
- 阿里云官方技术支持:[提交工单](https://workorder.console.aliyun.com/#/ticket/createIndex)

[releases-page]: https://github.com/aliyun/aliyun-oss-php-sdk/releases
3 changes: 3 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

require_once __DIR__ . '/vendor/autoload.php';
4 changes: 2 additions & 2 deletions src/OSS/OssClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -1990,8 +1990,8 @@ public function setConnectTimeout($connectTimeout)
);
// OssClient版本信息
const OSS_NAME = "aliyun-sdk-php";
const OSS_VERSION = "2.0.0";
const OSS_BUILD = "20151111";
const OSS_VERSION = "2.0.1";
const OSS_BUILD = "20151214";
const OSS_AUTHOR = "";
const OSS_OPTIONS_ORIGIN = 'Origin';
const OSS_OPTIONS_REQUEST_METHOD = 'Access-Control-Request-Method';
Expand Down

0 comments on commit 9cb7648

Please sign in to comment.