添加网站文件

This commit is contained in:
2025-12-22 13:59:40 +08:00
commit 117aaf83d1
19468 changed files with 2111999 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Cvm\V20170312\CvmClient;
// 导入要请求接口对应的Request类
use TencentCloud\Cvm\V20170312\Models\DescribeZonesRequest;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
use TencentCloud\Common\Profile\ClientProfile;
try {
// 实例化一个证书对象入参需要传入腾讯云账户secretIdsecretKey
$cred = new Credential(getenv("TENCENTCLOUD_SECRET_ID"), getenv("TENCENTCLOUD_SECRET_KEY"));
$clientProfile = new ClientProfile();
//$clientProfile->setLanguage(ClientProfile::$ZH_CN);
$clientProfile->setSignMethod(ClientProfile::$SIGN_HMAC_SHA256);
// # 实例化要请求产品(以cvm为例)的client对象
$client = new CvmClient($cred, "ap-guangzhou", $clientProfile);
// 实例化一个请求对象
$req = new DescribeZonesRequest();
// 通过client对象调用想要访问的接口需要传入请求对象
$resp = $client->DescribeZones($req);
print_r($resp->toJsonString());
}
catch(TencentCloudSDKException $e) {
echo $e;
}