gwk / s3streamwrapper
Amazon AWS S3 流包装器
0.3.2
2013-11-19 11:40 UTC
Requires
- aws/aws-sdk-php: >=2.1.0
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-09-28 14:06:53 UTC
README
Amazon S3 的简单流包装器。
示例
<?php use S3StreamWrapper\S3StreamWrapper; S3StreamWrapper::register(); $options = array( 'credentials' => [ 'key' => "YOUR AWS KEY HERE", 'secret' => "YOUR AWS SECRET HERE" ], 'region' => 'us-east-1', 'version' => '2006-03-01' ); stream_context_set_default(array('s3' => $options)); echo file_get_contents("s3://mybucket/file1"); echo file_put_contents("s3://mybucket/file2", "Foobar!"); print_r(scandir("s3://mybucket/"));
许可证
MIT, 查看 LICENSE