Skip to content

Commit ce3c88c

Browse files
committed
调整README文件格式
1 parent 700631c commit ce3c88c

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@
55
## 使用说明
66

77
### 初始化UpYun
8-
> require_once('upyun.class.php');
9-
>
10-
> $upyun = new UpYun('bucketname', 'username', 'password');
8+
````
9+
require_once('upyun.class.php');
10+
$upyun = new UpYun('bucketname', 'username', 'password');
11+
````
1112

1213
参数 `bucketname` 为空间名称,`useranme``password` 为授权操作员的账号密码,不是又拍云的登陆账号密码。
1314

1415
根据国内的网络情况,又拍云存储API目前提供了电信、网通、铁通三个接入点,在初始化的时候可以添加可选的第四个参数来指定API接入点。
15-
> $upyun = new UpYun('bucketname', 'username', 'password', UpYun::$ED_TELECOM);
16+
17+
````
18+
$upyun = new UpYun('bucketname', 'username', 'password', UpYun::$ED_TELECOM);
19+
````
1620

1721
接入点有四个值可选:
1822

@@ -21,4 +25,14 @@
2125
* **UpYun::$ED_CNC** 网通接入点
2226
* **UpYun::$ED_CTT** 铁通接入点
2327

24-
默认参数为自动选择API接入点。但是我们推荐根据服务器网络状况,手动选择合理的接入点已获取最佳的反问速度。
28+
默认参数为自动选择API接入点。但是我们推荐根据服务器网络状况,手动设置合理的接入点已获取最佳的访问速度。
29+
30+
### 创建目录
31+
````
32+
$upyun->mkDir('/demo/');
33+
````
34+
创建成功返回 `True`,否则抛出 `UpYun`
35+
36+
## 异常处理
37+
38+

upyun.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ protected function _do_request($method, $path, $headers = NULL, $body= NULL, $fi
303303
//return $this->_get_headers_data(substr($response, 0 , $header_size));
304304
return $this->_getHeadersData($header_string);
305305
}
306-
return true;
306+
return True;
307307
}
308308
else {
309309
$message = $this->_getErrorMessage($header_string);

0 commit comments

Comments
 (0)