File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,27 @@ Compare your version of curl with latest release listed on [curl's releases page
2323error_reporting(E_ALL);
2424```
2525
26+ ### Print some information that may hint at the cause of failure
27+
28+ ``` php
29+ error_reporting(E_ALL);
30+ $curl = new Curl();
31+ $curl->get('https://www.example.com/');
32+ echo 'error: ' . $curl->error . "\n";
33+ echo 'errorCode: ' . $curl->errorCode . "\n";
34+ echo 'errorMessage: ' . $curl->errorMessage . "\n";
35+ echo 'curlError: ' . $curlError . "\n";
36+ echo 'curlErrorCode: ' . $curlErrorCode . "\n";
37+ echo 'curlErrorMessage: ' . $curlErrorMessage . "\n";
38+ echo 'httpError: ' . $httpError . "\n";
39+ echo 'httpStatusCode: ' . $httpStatusCode . "\n";
40+ echo 'httpErrorMessage: ' . $httpErrorMessage . "\n";
41+ echo 'requestHeaders:' . "\n";
42+ var_dump($curl->requestHeaders);
43+ echo 'responseHeaders:' . "\n";
44+ var_dump($curl->responseHeaders);
45+ ```
46+
2647### Turn on verbose mode
2748
2849``` php
You can’t perform that action at this time.
0 commit comments