Closed ndj888 closed 3 years ago
初始化的时候要传入endpoints参数,README有调用示例
// 初始化用户Profile实例
$profile = DefaultProfile::getProfile("cn-hangzhou", $appKey, $appSecret);
DefaultProfile::addEndpoint("cn-hangzhou", "cn-hangzhou", "Dysmsapi", "dysmsapi.aliyuncs.com");
$acsClient = new DefaultAcsClient($profile);
/opt/project/vendor/huaifufeng/aliyun-sts/src/Core/Profile/DefaultProfile.php:107 /opt/project/vendor/huaifufeng/aliyun-sts/src/Core/Profile/DefaultProfile.php:94
public static function findEndpointByName($endpointName) { foreach (self::$endpoints as $key => $endpoint) { if($endpoint->getName() == $endpointName) { return $endpoint; } } }
经调试 self::$endpoints 为 null ,故抛出异常