|
...
|
...
|
@@ -72,13 +72,17 @@ class TencentCosService extends BaseService |
|
|
|
curl_setopt($curl, CURLOPT_INFILESIZE, filesize($url_path));
|
|
|
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
|
|
|
// 发起请求
|
|
|
|
$response = curl_exec($curl);
|
|
|
|
curl_exec($curl);
|
|
|
|
// 关闭文件流和CURL句柄
|
|
|
|
fclose($file);
|
|
|
|
curl_close($curl);
|
|
|
|
var_dump($response);
|
|
|
|
die();
|
|
|
|
return $response;
|
|
|
|
// 检查响应状态码
|
|
|
|
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
|
|
|
if ($httpCode == 200) {
|
|
|
|
return 1;
|
|
|
|
} else {
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
|