正在显示
1 个修改的文件
包含
1 行增加
和
3 行删除
| @@ -47,9 +47,7 @@ class TencentCosService extends BaseService | @@ -47,9 +47,7 @@ class TencentCosService extends BaseService | ||
| 47 | $contentType = 'image/'.$image_type; | 47 | $contentType = 'image/'.$image_type; |
| 48 | date_default_timezone_set('Asia/Shanghai'); | 48 | date_default_timezone_set('Asia/Shanghai'); |
| 49 | $date = date('D, d M Y H:i:s \G\M\T'); | 49 | $date = date('D, d M Y H:i:s \G\M\T'); |
| 50 | - $expiredTime = time() + 3600; | ||
| 51 | - var_dump(date('Y-m-d H:i:s',$expiredTime)); | ||
| 52 | - die(); | 50 | + $expiredTime = time() + 3600000; |
| 53 | $filePath = $path.'/'.$fileName; | 51 | $filePath = $path.'/'.$fileName; |
| 54 | $stringToSign = "{$httpVerb}\n{$contentMd5}\n{$contentType}\n{$date}\n/{$this->config['bucket']}/{$filePath}"; | 52 | $stringToSign = "{$httpVerb}\n{$contentMd5}\n{$contentType}\n{$date}\n/{$this->config['bucket']}/{$filePath}"; |
| 55 | $sign = base64_encode(hash_hmac('sha1', $stringToSign, $this->config['secretKey'], true)); | 53 | $sign = base64_encode(hash_hmac('sha1', $stringToSign, $this->config['secretKey'], true)); |
-
请 注册 或 登录 后发表评论