添加网站文件

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,49 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Ecc\V20181213\EccClient;
// 导入要请求接口对应的Request类
use TencentCloud\Ecc\V20181213\Models\ECCRequest;
use TencentCloud\Ecc\V20181213\Models\ECCResponse;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
// 实例化一个证书对象入参需要传入腾讯云账户secretIdsecretKey
$cred = new Credential("", "");
//$cred = new Credential(getenv("TENCENTCLOUD_SECRET_ID"), getenv("TENCENTCLOUD_SECRET_KEY"));
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
//$httpProfile->setReqMethod("post"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("ecc.ap-shanghai.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("HmacSHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
$client = new EccClient($cred, "ap-shanghai", $clientProfile);
// 实例化一个ecc实例信息查询请求对象,每个接口都会对应一个request对象。
$req = new ECCRequest();
$req->Content = "this composition content";
$resp = $client->ECC($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
print_r($resp->TotalCount);
}
catch(TencentCloudSDKException $e) {
echo $e;
}

File diff suppressed because one or more lines are too long