We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http://developer.qiniu.com/docs/v6/api/reference/rs/fetch.html 这段代码为什么实现后总是提醒我 {"error":"bad token"} 呢
$conf = Config::get('api.qiniuResource'); $remote_url ='http://qiniu.u.qiniudn.com/'.$fileName; $enc_remote_url = Qiniu_Encode($remote_url); $encode_entry_uri = Qiniu_Encode_entry_uri($conf['BUCKET'],$fileName); $path = "/fetch/{$enc_remote_url}/to/{$encode_entry_uri}"; $signing_str = $path + "\n"; $encoded_sign = hash_hmac('sha1', $signing_str, $conf['API_SECRET'], true); $athorization = 'QBox '.$conf['API_KEY'] . ':' . Qiniu_Encode($encoded_sign); $headers = array( "Content-type: application/x-www-form-urlencoded", 'Athorization: '.$athorization, 'Host: iovip.qbox.me' ); $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,'http://iovip.qbox.me'.$path); curl_setopt ($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1); curl_setopt($ch, CURLOPT_POSTFIELDS,''); $result = curl_exec($ch); $rinfo = curl_getinfo($ch); curl_close($ch);
The text was updated successfully, but these errors were encountered:
accesskey 没有填吧
Sorry, something went wrong.
我的A.K是 $conf['API_KEY'] 。
conf 里的 API key 里没有填吧
这类错误一般都是 key 没有填对
No branches or pull requests
http://developer.qiniu.com/docs/v6/api/reference/rs/fetch.html
这段代码为什么实现后总是提醒我 {"error":"bad token"} 呢
The text was updated successfully, but these errors were encountered: