Skip to content

Commit c20063d

Browse files
authored
Fix cos-autoloader (#5)
* Update test file * Update test file * Update test file * Update test file * Update test file * Add token * Update sample.php * Fix src * fix src
1 parent 66d4c72 commit c20063d

File tree

3 files changed

+273
-275
lines changed

3 files changed

+273
-275
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public Guzzle\Service\Resource\Model getObject(array $args = array());
102102
$args是包含以下字段的关联数组:
103103

104104
| 字段名 | 类型 | 默认值 | 是否必填字段 | 描述 |
105-
| :------: | :------------: | :--: | :--------: | :----------------------------------: |
105+
| :------: | :------------: | :--: | :--------: | :----------------------------------: |
106106
| Bucket | string ||| bucket名称 |
107107
| Key | string ||| 对象名称 |
108108
| SaveAs | string ||| 保存到本地的本地文件路径 |
@@ -253,8 +253,6 @@ $signedUrl = $cosClient->getObjectUrl($bucket, $key, '+10 minutes');
253253
```
254254
### 使用临时密钥
255255

256-
#### 示例
257-
258256
```php
259257
$cosClient = new Qcloud\Cos\Client(
260258
array(
@@ -265,4 +263,4 @@ $cosClient = new Qcloud\Cos\Client(
265263
'secretId' => '',
266264
'secretKey' => '',
267265
'token' => '')));
268-
```
266+

cos-autoloader-generator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
$ext = pathinfo($path, PATHINFO_EXTENSION);
1616
if ($ext === 'php') {
1717
$namespace = preg_replace('/.php$/s', '', $path);
18-
$namespace = str_replace('/', '\\', $namespace);
18+
$path = str_replace('\\', '/', $path);
1919
echo " '$namespace' => 'src/$path',\n";
2020
}
2121
}

0 commit comments

Comments
 (0)