Curl returns true instead of value

前端 未结 2 1736
梦毁少年i
梦毁少年i 2020-12-20 15:52

I\'m trying to make a simple API. However, not sure why but I\'m getting true instead of the value that should be returned.

Here\'s the curl code.

tr         


        
2条回答
  •  甜味超标
    2020-12-20 16:34

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); you need to put that to return data in proper format also you can check datatype of your output using gettype($string);

提交回复
热议问题