[英]Copying an object from one Amazon S3 bucket to another using PHP
[英]Copying files from one folder to another in Amazon S3 bucket using php
如何使用Codeigniter將所有文件從目錄(文件夾)復制到Amazon S3存儲桶中的其他目錄。
您應該查看S3工具: http : //s3tools.org/s3cmd 。
您可以將其安裝在服務器上,然后有了各種命令行工具來處理s3存儲桶中的內容。
安裝完成后,您可以使用php的exec()
調用s3cmd的“ put”(將本地文件移動到s3存儲桶exec()
,該exec()
執行外殼程序命令:
exec('s3cmd put /my-local-dir/some_file.txt s3://my-s3-bucket/some-dir/some_file.txt');
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.