Seven cows delete file error string (one) "No URL set!"

Source: Internet
Author: User
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.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.