Require_once ("qiniu/rs.php");
Qiniu_setkeys (Your_app_access_key, Your_app_secret_key);
$client = new qiniu_machttpclient (null);
$err = Qiniu_rs_delete ($client, space name, file name);
if ($err!== null) {
Var_dump ($err);
Exit ();
}
Array (2) {[0]=> NULL [1]=> object (qiniu_error) #5 (4) {["Err"]=> string (one) "No URL set!" ["Reqid"]=> null ["Details"]=> null ["Code"]=> int (0)}}
Did I write it wrong?
Reply content:
Require_once ("qiniu/rs.php");
Qiniu_setkeys (Your_app_access_key, Your_app_secret_key);
$client = new qiniu_machttpclient (null);
$err = Qiniu_rs_delete ($client, space name, file name);
if ($err!== null) {
Var_dump ($err);
Exit ();
}
Array (2) {[0]=> NULL [1]=> object (qiniu_error) #5 (4) {["Err"]=> string (one) "No URL set!" ["Reqid"]=> null ["Details"]=> null ["Code"]=> int (0)}}
Did I write it wrong?
You can debug it and see if this URL is not set
is the Curl Library error, the Curlopt_url of the Curl Library is not set
You qiniu/http.php
find Qiniu_MacHttpClient
this class in, simply modify the following RoundTrip
function to print the request before return:
public function RoundTrip($req) // => ($resp, $error){ $incbody = Qiniu_Client_incBody($req); $token = $this->Mac->SignRequest($req, $incbody); $req->Header['Authorization'] = "QBox $token"; var_dump($req); return Qiniu_Client_do($req);}
See if the URL in the request is correct.