【发布时间】:2014-07-05 11:02:08
【问题描述】:
我正在编写一个从 Bing Ads API 生成报告的 Web 应用程序,如下所示:
我已经编译了代码,但是在运行时,服务器突然结束请求并在此代码块的开头返回 ERR_INCOMPLETE_CHUNKED_ENCODING:
$waitTime = 30 * 1;
$reportRequestStatus = null;
// This sample polls every 30 seconds up to 5 minutes.
// In production you may poll the status every 1 to 2 minutes for up to one hour.
// If the call succeeds, stop polling. If the call or
// download fails, the call throws a fault.
for ($i = 0; $i < 10; $i++)
{
sleep($waitTime);
// PollGenerateReport helper method calls the corresponding Bing Ads service operation
// to get the report request status.
$reportRequestStatus = PollGenerateReport(
$proxy,
$reportRequestId
);
if ($reportRequestStatus->Status == ReportRequestStatusType::Success ||
$reportRequestStatus->Status == ReportRequestStatusType::Error)
{
break;
}
}
我试图打印出值并逐行调试,但我无法弄清楚是什么导致了这个错误。谷歌搜索错误也不会显示任何相关内容。我想知道是否有其他人以前遇到过这个错误,能告诉我是什么原因造成的吗?
谢谢!
【问题讨论】:
标签: php html asp.net httprequest bing-api