Skip to content

Commit 6849a0e

Browse files
committed
style:modify rs_asynch_fetch.php
1 parent 4f6b594 commit 6849a0e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/rs_asynch_fetch.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,25 @@
3434
// 指定抓取的文件保存到七牛云空间中的名称
3535

3636
$key = time() . '.png';
37-
list($id, $err) = $bucketManager->asynchFetch($url, $bucket, null, $key, null, null, $callbackurl, $callbackbody);
37+
list($ret, $err) = $bucketManager->asynchFetch($url, $bucket, null, $key, null, null, $callbackurl, $callbackbody);
3838
echo "=====> asynch fetch $url to bucket: $bucket key: $key\n";
3939
if ($err !== null) {
4040
var_dump($err);
4141
} else {
42+
$id = $ret['id'];
4243
echo "id is: $id\n";
4344
}
4445

4546
//---------------------------------------- demo2 ----------------------------------------
4647
// 不指定 key 时,以文件内容的 hash 作为文件名
4748

4849
$key = null;
49-
list($id, $err) = $bucketManager->asynchFetch($url, $bucket, null, $key, null, null, $callbackurl, $callbackbody);
50+
list($ret, $err) = $bucketManager->asynchFetch($url, $bucket, null, $key, null, null, $callbackurl, $callbackbody);
5051
echo "=====> asynch fetch $url to bucket: $bucket key: $(etag)\n";
5152
if ($err !== null) {
5253
var_dump($err);
5354
} else {
55+
$id = $ret['id'];
5456
echo "id is: $id\n";
5557
}
5658

0 commit comments

Comments
 (0)