gpt4 book ai didi

php - curl post后,如何检查postfield - 调试

转载 作者:行者123 更新时间:2023-12-04 14:08:28 25 4
gpt4 key购买 nike

我有一个类似这样的卷发帖子

curl_setopt($ch, CURLOPT_URL,$cpUrl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $varpost); // post parameters
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Return the output in string format
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_NOBODY, true);
$output = curl_exec ($ch); // Execute
我如何在 curl_close ($ch) 之后检查;发送了哪些帖子字段变量?请帮忙

最佳答案

how can i check after curl_close ($ch); what post field variables were sent?



您的脚本提供随 CURLOPT_POSTFIELDS 一起发送的变量。选项,所以如果 cURL 成功执行,你已经有了这些变量:
...
$output = curl_exec($ch); // Execute

//show the POST fields if they were sent successfully
if($output) print_r($varpost);
else echo "cURL failed: no POST fields sent";

关于php - curl post后,如何检查postfield - 调试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38518114/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com