偶尔我想通过在Linux终端中运行实际的curl命令来调试curl请求是否有可能以String格式获取PHP生成的命令以获取curl命令,这样的话?
curl -X PUT \
-H "x-pushbots-appid: 54cc0a511d0ab13c0528b459d" \
-H "x-pushbots-secret: 1444fe8be3324ff7128f25aa18cdee12" \
-H "Content-Type: application/json" \
-d '{ "token" : String , "platform" : String , "lat" : String , "lng" : String , "active" : Array , "tag" : Array , "alias" : String }' \
https://api.pushbots.com/deviceToken
答案 0 :(得分:1)
您需要避免执行CLI,因为调试它非常困难。我建议你使用PHP的cURL扩展(http://php.net/manual/en/ref.curl.php)然后你可以调试: