开发者

Capture curl stderr and print stdout in php

开发者 https://www.devze.com 2023-03-03 17:58 出处:网络
I\'m using curl & php and something\'s not working. How can I capture STDERR and print it to STDOUT in php when running through a开发者_如何学C web server?

I'm using curl & php and something's not working.

How can I capture STDERR and print it to STDOUT in php when running through a开发者_如何学C web server?

Thanks


if (curl_errno($ch)) { echo curl_error($ch); }


TRY with

curl_setopt($curl,CURLOPT_FAILONERROR,FALSE); and print the error
$result = curl_exec($curl); by print_r($result);

0

精彩评论

暂无评论...
验证码 换一张
取 消