Skip to content

Instantly share code, notes, and snippets.

@kejyun
Created August 2, 2012 08:22
Show Gist options
  • Save kejyun/3235343 to your computer and use it in GitHub Desktop.
Save kejyun/3235343 to your computer and use it in GitHub Desktop.
複製AWS S3檔案
<?php
/*
* 複製檔案
*/
$bucket = "kejyun-test"; //容器名稱
$s3 = new AmazonS3();
$response = $s3->copy_object(
array( // 來源
'bucket' => $bucket,
'filename' => '/test1.txt'
),
array( // 目標
'bucket' => $bucket,
'filename' => '/test2.txt'
)
);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment