xyqweb/aliyun-php-sdk

aliyun-php-sdk 集成

v1.0.2 2020-09-19 03:58 UTC

This package is auto-updated.

Last update: 2024-09-19 13:00:33 UTC


README

阿里云PHP SDK 整合

这里 fork
在 vendor 中删除代理配置,并强制加载原始仓库的 bootstrap.php,调用 DefaultProfile::getProfile 时加载配置
删除原仓库在 vendor 中的代理配置,并强制加载 bootstrap.php,改为在调用 DefaultProfile::getProfile 时加载配置

需求

  • PHP 7.1+

安装

$ composer require xyqweb/aliyun-php-sdk

快速示例

$clientProfile = DefaultProfile::getProfile(
    $mps_region_id,
    $access_key_id,
    $access_key_secret
);
//If host is "0.0.0.0" or port is 0, no proxy is used(如果host为’0.0.0.0‘ 或者 port为0不使用代理)
$client = new DefaultAcsClient($clientProfile,[
'host' => '0.0.0.0',//Proxy server ip
'port' => 0 //Proxy server port,0
]);

许可

Apache License 2.0