This commit is contained in:
2024-07-15 10:54:32 +08:00
parent 35a0d489f8
commit e499661572
2 changed files with 2 additions and 11 deletions

View File

@@ -165,6 +165,7 @@ class Reportty
//修改报告
$str = <<<EOF
病例:未知\n\n
【姓名】:{$data['name']}
【年龄】:{$data['age']}
【性别】:{$data['gender']}

View File

@@ -50,6 +50,7 @@ class Test extends BasePublicController
'signa' => $signa,
'lang' => 'zh-cn', // 中文普通话
];
dump($params);
$str = '';
$i = 0;
foreach ($params as $key => $value){
@@ -61,21 +62,10 @@ class Test extends BasePublicController
}
$i++;
}
// 构建请求参数并进行URL编码
//$params = http_build_query([
// 'appid' => $appId,
// 'ts' => $ts,
// 'signa' => $signa,
// 'lang' => 'zh-cn', // 中文普通话
//]);
//$encodedParams = urlencode($params); // 对查询参数进行URL编码
$encodedParams = urlencode($str); // 对查询参数进行URL编码
// 构建WebSocket请求URL
$requestUrl = $url . '?' . $encodedParams;
dump($requestUrl);
// 使用SecureConnector连接到WebSocket服务器
$secureConnector->connect($requestUrl)->then(function (ConnectionInterface $conn) {
echo "Connected to the WebSocket server\n";