php代码 大佬帮我看下哪里写错了
/**
* 腾讯云鉴权
*/
private function get_signature($code){
$secretKey = '***************';
$secretid = "**************";
$action = "GetUserAccessToken";
$nonce = rand(100000,999999);
$timestamp = time();
$srcStr = 'GETopen.api.qcloud.com/v2/index.php?Action='.$action.'&Nonce='.$nonce.'&SecretId='.$secretid.'&SignatureMethod=HmacSHA256&Timestamp='.$timestamp.'&userAuthCode='.$code;
$signStr = base64_encode(hash_hmac('sha256', $srcStr, $secretKey, true));
$signStrs = urlencode($signStr);
return $signStrs;
}
相似问题