@@ -53,14 +53,14 @@ SDK源码地址:<https://github.com/qiniu/php-sdk/tags>
53
53
54
54
示例代码如下:
55
55
56
- require_once("rs.php");
56
+ require_once("qiniu/ rs.php");
57
57
58
58
$bucket = "phpsdk";
59
59
$key = "pic.jpg";
60
60
$accessKey = '<YOUR_APP_ACCESS_KEY>';
61
61
$secretKey = '<YOUR_APP_SECRET_KEY>';
62
62
63
- Qiniu_setKeys ($accessKey, $secretKey);
63
+ Qiniu_SetKeys ($accessKey, $secretKey);
64
64
$client = new Qiniu_MacHttpClient(null);
65
65
66
66
list($ret, $err) = Qiniu_RS_Stat($client, $bucket, $key);
@@ -76,15 +76,15 @@ SDK源码地址:<https://github.com/qiniu/php-sdk/tags>
76
76
77
77
示例代码如下:
78
78
79
- require_once("rs.php");
79
+ require_once("qiniu/ rs.php");
80
80
81
81
$bucket = "phpsdk";
82
82
$key = "pic.jpg";
83
83
$key1 = "file_name1";
84
84
$accessKey = '<YOUR_APP_ACCESS_KEY>';
85
85
$secretKey = '<YOUR_APP_SECRET_KEY>';
86
86
87
- Qiniu_setKeys ($accessKey, $secretKey);
87
+ Qiniu_SetKeys ($accessKey, $secretKey);
88
88
$client = new Qiniu_MacHttpClient(null);
89
89
90
90
$err = Qiniu_RS_Copy($client, $bucket, $key, $bucket, $key1);
@@ -100,15 +100,15 @@ SDK源码地址:<https://github.com/qiniu/php-sdk/tags>
100
100
101
101
示例代码如下:
102
102
103
- require_once("rs.php");
103
+ require_once("qiniu/ rs.php");
104
104
105
105
$bucket = "phpsdk";
106
106
$key = "pic.jpg";
107
107
$key1 = "file_name1";
108
108
$accessKey = '<YOUR_APP_ACCESS_KEY>';
109
109
$secretKey = '<YOUR_APP_SECRET_KEY>';
110
110
111
- Qiniu_setKeys ($accessKey, $secretKey);
111
+ Qiniu_SetKeys ($accessKey, $secretKey);
112
112
$client = new Qiniu_MacHttpClient(null);
113
113
114
114
$err = Qiniu_RS_Move($client, $bucket, $key, $bucket, $key1);
@@ -124,14 +124,14 @@ SDK源码地址:<https://github.com/qiniu/php-sdk/tags>
124
124
125
125
示例代码如下:
126
126
127
- require_once("rs.php");
127
+ require_once("qiniu/ rs.php");
128
128
129
129
$bucket = "phpsdk";
130
130
$key1 = "file_name1";
131
131
$accessKey = '<YOUR_APP_ACCESS_KEY>';
132
132
$secretKey = '<YOUR_APP_SECRET_KEY>';
133
133
134
- Qiniu_setKeys ($accessKey, $secretKey);
134
+ Qiniu_SetKeys ($accessKey, $secretKey);
135
135
$client = new Qiniu_MacHttpClient(null);
136
136
137
137
$err = Qiniu_RS_Delete($client, $bucket, $key1);
@@ -178,13 +178,13 @@ SDK源码地址:<https://github.com/qiniu/php-sdk/tags>
178
178
服务端生成 [ uptoken] ( http://docs.qiniu.com/api/put.html#uploadToken ) 代码如下:
179
179
180
180
181
- require_once("rs.php");
181
+ require_once("qiniu/ rs.php");
182
182
183
183
$bucket = 'phpsdk';
184
184
$accessKey = '<YOUR_APP_ACCESS_KEY>';
185
185
$secretKey = '<YOUR_APP_SECRET_KEY>';
186
186
187
- Qiniu_setKeys ($accessKey, $secretKey);
187
+ Qiniu_SetKeys ($accessKey, $secretKey);
188
188
$putPolicy = new Qiniu_RS_PutPolicy($bucket);
189
189
$upToken = $putPolicy->Token(null);
190
190
@@ -193,15 +193,15 @@ SDK源码地址:<https://github.com/qiniu/php-sdk/tags>
193
193
194
194
上传字符串
195
195
196
- require_once("io.php");
197
- require_once("rs.php");
196
+ require_once("qiniu/ io.php");
197
+ require_once("qiniu/ rs.php");
198
198
199
199
$bucket = "phpsdk";
200
200
$key1 = "file_name1";
201
201
$accessKey = '<YOUR_APP_ACCESS_KEY>';
202
202
$secretKey = '<YOUR_APP_SECRET_KEY>';
203
203
204
- Qiniu_setKeys ($accessKey, $secretKey);
204
+ Qiniu_SetKeys ($accessKey, $secretKey);
205
205
$putPolicy = new Qiniu_RS_PutPolicy($bucket);
206
206
$upToken = $putPolicy->Token(null);
207
207
list($ret, $err) = Qiniu_Put($upToken, $key1, "Qiniu Storage!", null);
@@ -214,15 +214,15 @@ SDK源码地址:<https://github.com/qiniu/php-sdk/tags>
214
214
215
215
上传本地文件
216
216
217
- require_once("io.php");
218
- require_once("rs.php");
217
+ require_once("qiniu/ io.php");
218
+ require_once("qiniu/ rs.php");
219
219
220
220
$bucket = "phpsdk";
221
221
$key1 = "file_name1";
222
222
$accessKey = '<YOUR_APP_ACCESS_KEY>';
223
223
$secretKey = '<YOUR_APP_SECRET_KEY>';
224
224
225
- Qiniu_setKeys ($accessKey, $secretKey);
225
+ Qiniu_SetKeys ($accessKey, $secretKey);
226
226
$putPolicy = new Qiniu_RS_PutPolicy($bucket);
227
227
$upToken = $putPolicy->Token(null);
228
228
$putExtra = new Qiniu_PutExtra();
@@ -295,14 +295,14 @@ SDK源码地址:<https://github.com/qiniu/php-sdk/tags>
295
295
注意,尖括号不是必需,代表替换项。
296
296
私有下载链接可以使用 SDK 提供的如下方法生成:
297
297
298
- require_once("rs.php");
298
+ require_once("qiniu/ rs.php");
299
299
300
300
$key = 'pic.jpg';
301
301
$domain = 'phpsdk.qiniudn.com';
302
302
$accessKey = '<YOUR_APP_ACCESS_KEY>';
303
303
$secretKey = '<YOUR_APP_SECRET_KEY>';
304
304
305
- Qiniu_setKeys ($accessKey, $secretKey);
305
+ Qiniu_SetKeys ($accessKey, $secretKey);
306
306
$baseUrl = Qiniu_RS_MakeBaseUrl($domain, $key);
307
307
$getPolicy = new Qiniu_RS_GetPolicy();
308
308
$privateUrl = $getPolicy->MakeRequest($baseUrl);
@@ -319,15 +319,15 @@ SDK源码地址:<https://github.com/qiniu/php-sdk/tags>
319
319
<a name =fop-image-info ></a >
320
320
#### 1.1 查看图像属性
321
321
322
- require_once("rs.php");
323
- require_once("fop.php");
322
+ require_once("qiniu/ rs.php");
323
+ require_once("qiniu/ fop.php");
324
324
325
325
$key = 'pic.jpg';
326
326
$domain = 'phpsdk.qiniudn.com';
327
327
$accessKey = '<YOUR_APP_ACCESS_KEY>';
328
328
$secretKey = '<YOUR_APP_SECRET_KEY>';
329
329
330
- Qiniu_setKeys ($accessKey, $secretKey);
330
+ Qiniu_SetKeys ($accessKey, $secretKey);
331
331
//生成baseUrl
332
332
$baseUrl = Qiniu_RS_MakeBaseUrl($domain, $key);
333
333
@@ -347,15 +347,15 @@ SDK源码地址:<https://github.com/qiniu/php-sdk/tags>
347
347
#### 1.2 查看图片EXIF信息
348
348
349
349
350
- require_once("rs.php");
351
- require_once("fop.php");
350
+ require_once("qiniu/ rs.php");
351
+ require_once("qiniu/ fop.php");
352
352
353
353
$key = 'pic.jpg';
354
354
$domain = 'phpsdk.qiniudn.com';
355
355
$accessKey = '<YOUR_APP_ACCESS_KEY>';
356
356
$secretKey = '<YOUR_APP_SECRET_KEY>';
357
357
358
- Qiniu_setKeys ($accessKey, $secretKey);
358
+ Qiniu_SetKeys ($accessKey, $secretKey);
359
359
//生成baseUrl
360
360
$baseUrl = Qiniu_RS_MakeBaseUrl($domain, $key);
361
361
@@ -372,15 +372,15 @@ SDK源码地址:<https://github.com/qiniu/php-sdk/tags>
372
372
<a name =fop-image-view ></a >
373
373
#### 1.3 生成图片预览
374
374
375
- require_once("rs.php");
376
- require_once("fop.php");
375
+ require_once("qiniu/ rs.php");
376
+ require_once("qiniu/ fop.php");
377
377
378
378
$key = 'pic.jpg';
379
379
$domain = 'phpsdk.qiniudn.com';
380
380
$accessKey = '<YOUR_APP_ACCESS_KEY>';
381
381
$secretKey = '<YOUR_APP_SECRET_KEY>';
382
382
383
- Qiniu_setKeys ($accessKey, $secretKey);
383
+ Qiniu_SetKeys ($accessKey, $secretKey);
384
384
//生成baseUrl
385
385
$baseUrl = Qiniu_RS_MakeBaseUrl($domain, $key);
386
386
0 commit comments