File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -47,14 +47,18 @@ SDK 安装有三种方式:
47
47
48
48
推荐使用 Composer 安装 cos-php-sdk-v5,Composer 是 PHP 的依赖管理工具,允许您声明项目所需的依赖,然后自动将它们安装到您的项目中。
49
49
50
+ ``` bash
51
+ composer require qcloud/cos-sdk-v5
52
+ ```
53
+
50
54
> 您可以在 [ Composer 官网] ( https://getcomposer.org/ ) 上找到更多关于如何安装 Composer,配置自动加载以及用于定义依赖项的其他最佳实践等相关信息。
51
55
52
56
#### 安装步骤:
53
57
54
58
1 . 打开终端。
55
59
2 . 下载 Composer,执行以下命令。
56
60
57
- ```
61
+ ``` bash
58
62
curl -sS https://getcomposer.org/installer | php
59
63
```
60
64
@@ -70,7 +74,7 @@ curl -sS https://getcomposer.org/installer | php
70
74
71
75
4 . 使用 Composer 安装,执行以下命令。
72
76
73
- ```
77
+ ``` bash
74
78
php composer.phar install
75
79
```
76
80
@@ -305,6 +309,6 @@ try {
305
309
$signedUrl = $cosClient->getObjectUrl($bucket, $key, '+10 minutes');
306
310
echo $signedUrl;
307
311
} catch (\Exception $e) {
308
- print_r($e) ;
312
+ echo "$e\n" ;
309
313
}
310
314
```
You can’t perform that action at this time.
0 commit comments