[英]XML-RPC: xmlrpc_server::service: http headers already sent before response is fully generated
I am using a web service to dispatch a zip to from one server to another server. 我正在使用Web服务将zip从一个服务器分发到另一台服务器。 I have been using a web service code its working fine but, sometimes web service getting error like this
我一直在使用网络服务代码,但其工作正常,但有时网络服务会出现这样的错误
XML-RPC: xmlrpc_server::service: http headers already sent before response is fully generated
XML-RPC:xmlrpc_server :: service:在完全生成响应之前已经发送了HTTP标头
and more file requested file does not dispatching. 并且更多文件请求的文件未调度。 I tried to solve this problem, but I couldn't solve it.
我试图解决此问题,但无法解决。 How could achieve this?
如何做到这一点? Here is my code:
这是我的代码:
$arg = array(
new xmlrpcval($result->Customer, "string"),
new xmlrpcval($result->JID, "string"),
new xmlrpcval($result->AID,"string"),
new xmlrpcval($fileSize,"string")
);
$server = new xmlrpc_client($fileName, $ip, $port);
$message = new xmlrpcmsg('sendArticleDetails', $arg);
$res = $server->send($message);
I assume that you are using xmlrpc from http://sourceforge.net/projects/phpxmlrpc/ 我假设您正在使用http://sourceforge.net/projects/phpxmlrpc/中的 xmlrpc
When the above message is thrown there could be two reasons : 抛出以上消息时,可能有两个原因:
a) any output has been made before the code you posted above. a)在上面发布的代码之前已完成任何输出。 This can be a echo or print() message (might be inside an if statement) or an error message.
这可以是echo或print()消息(可能在if语句内)或错误消息。 (Check the display_errors settings in the php.ini )
(检查php.ini中的display_errors设置)
b) an explicit call to header() in the code before b)在之前的代码中显式调用header()
Assuming a) 假设a)
Thorsten 索斯滕
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.