This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 刪除容器所有檔案 | |
*/ | |
$bucket = "kejyun-test"; //容器名稱 | |
$s3 = new AmazonS3(); | |
$response = $s3->delete_all_objects($bucket); | |
print_r($response); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 刪除容器指定檔案 | |
*/ | |
$bucket = "kejyun-test"; //容器名稱 | |
$filepath = "/S3.txt"; | |
$s3 = new AmazonS3(); | |
$response = $s3->delete_object($bucket,$filepath); | |
print_r($response); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 刪除容器 | |
*/ | |
$bucket = "kejyun-test"; //容器名稱 | |
$s3 = new AmazonS3(); | |
$response = $s3->delete_bucket($bucket); | |
print_r($response); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 取得容器所有檔案容量(位元組) | |
*/ | |
$bucket = "kejyun-test"; //容器名稱 | |
$s3 = new AmazonS3(); | |
$response = $s3->get_bucket_filesize($bucket); | |
print_r($response); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 取得容器伺服器區域位置(response->body) | |
*/ | |
$bucket = "kejyun-test"; //容器名稱 | |
$s3 = new AmazonS3(); | |
$response = $s3->get_bucket_region($bucket); | |
print_r($response); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 更新容器檔案資訊 | |
*/ | |
$bucket = "kejyun-test"; //容器名稱 | |
$filepath = "/S3.txt"; //檔案路徑 | |
$s3 = new AmazonS3(); | |
$response = $s3->update_object($bucket, $filepath, array( | |
'acl' => AmazonS3::ACL_PUBLIC, | |
'headers' => array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 複製檔案 | |
*/ | |
$bucket = "kejyun-test"; //容器名稱 | |
$s3 = new AmazonS3(); | |
$response = $s3->copy_object( | |
array( // 來源 | |
'bucket' => $bucket, | |
'filename' => '/test1.txt' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 變更檔案儲存類型 | |
*/ | |
$bucket = "kejyun-test"; //容器名稱 | |
$s3 = new AmazonS3(); | |
$response = $s3->change_storage_redundancy($bucket, 'test1.txt', AmazonS3::STORAGE_REDUCED); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>使用jQuery移除Hinet空間廣告</title> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$('document').ready(function(){ | |
$(parent.document).find('frameSet').attr("cols","*,0") | |
}); | |
</script> | |
</head> |