<?php
require dirname(__FILE__) . '/../vendor/autoload.php';
$secretId = "SECRETID";
$secretKey = "SECRETKEY";
$region = "ap-beijing";
$cosClient = new Qcloud\\Cos\\Client(
array(
'region' => $region,
'schema' => 'https',
'credentials'=> array(
'secretId' => $secretId ,
'secretKey' => $secretKey)));
try {
$cosClient->listBuckets()
} catch (Qcloud\\Cos\\Exception\\ServiceResponseException $e) {
$statusCode = $e->getStatusCode();
$errorMessage = $e->getMessage();
$requestId = $e->getRequestId();
$errorCode = $e->getCosErrorCode();
$request = $e->getRequest();
$response = $e->getResponse();
echo ($e);
} catch (\\Exception $e) {
}
本页内容是否解决了您的问题?