04 AWS S3
PHP를 위한 S3 SDK : 파일 목록 가져오기
s3_list.php
1 2 3 4 5 6 7 8 9 10 | <?phprequire 'vendor/autoload.php';$param = Array('region'=>'ap-northeast-2', 'version'=>'2006-03-01');$s3 = new Aws\S3\S3Client($param);$list = $s3->listObjects(Array('Bucket'=>'codingeverybody2'));$listArray = $list->toArray();foreach($listArray['Contents'] as $item){ print($item['Key']."\n");}?> |