腾讯云对象存储兼容S3SDK-PHP

SDK-PHP安装

安装AWSSDK-php的方法有很多,推荐一种最简单的方法:

a.从地址http://docs.aws.amazon.com/aws-sdk-php/v3/download/aws.zip下载软件包;

b.解压aws.zip到一个目录,如’C:\mydir;

c.在使用sdk-php时,你只要添加下面的语句就可以了

require'C:\mydir\aws\aws-autoloader.php';更多安装sdk-php的方法,你可以参考文档:http://docs.aws.amazon.com/aws-sdk-php/v3/guide/getting-started/installation.html创建client

仍然通过创建一个client来帮助你快速入手,更多用法请参考:http://docs.aws.amazon.com/aws-sdk-php/v3/guide/getting-started/index.html

?phprequire'C:\mydir\aws\aws-autoloader.php';useAws\S3\S3Client;$s3=newS3Client(['version'='latest','region'='cn-north-1','endpoint'='http://s3.cn-north-1.jdcloud-oss.com','signature_version'='v4','credentials'=['key'='youraccesskey','secret'='yoursecretkey',],]);//uses3clienttocreatebucket、putobject....?