我在我的 PHP 脚本中收到一个 POST 请求,我想将这个 POST 调用转发到另一个也使用 POST 的脚本。我该怎么做?
如果此操作需要,我可以使用 cURL。
最佳答案
也许:
curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
来自 curl_setopt :
This can either be passed as a urlencoded string like 'para1=val1¶2=val2&...' or as an array with the field name as key and field data as value.
关于php - 如何使用 PHP 和 cURL 转发 $_POST?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2725488/