【发布时间】:2010-12-27 20:36:12
【问题描述】:
每次我尝试使用 curl 使用 php 脚本发布数据时都会收到错误 413。 我可以“获取”网页,但是当我使用“发布”时,脚本会随着
does not allow request data with POST requests, or the amount of data provided<br> in the request exceeds the capacity limit.
我有一个 py 脚本,它可以工作。 这是一个不起作用的示例代码:
$q=curl_init(POSTURL);
curl_setopt($q,CURLOPT_POST,true);
curl_setopt($q,CURLOPT_RETURNTRANSFER,true);
$post=array("q"=>2);
$ss=curl_setopt($q,CURLOPT_URL,"http://localhost");
curl_setopt($q,CURL_POSTFIELDS,$post);
$f=curl_exec($q);
curl_close($q);
echo $f." is error";
我不知道问题出在 apache 上,还是我的脚本上还是其他问题。
【问题讨论】: