PHP - Debugging Curl

后端 未结 8 1330
無奈伤痛
無奈伤痛 2020-11-21 11:35

I\'d like to see what the post fields in the request are before I send it. (For debugging purposes).

The PHP library (class) I am using is already made (not by me),

8条回答
  •  情深已故
    2020-11-21 12:13

    To just get the info of a CURL request do this:

    $response = curl_exec($ch);
    
    $info = curl_getinfo($ch);
    var_dump($info);
    

提交回复
热议问题