zend xmlrpc 进程需要优雅地终止
我正在运行一个 Zend XMLRPC Web 服务,但在我的类中,我需要脚本优雅地终止,并且希望 XMLRPC 不要抛出错误。这可能吗?
概览
XMLRPC 客户端启动启动类实例的调用, XMLRPC 客户端将查询值传递给对象 如果查询没有返回值,我需要脚本通过电子邮件向我发送查询和传递用于调试的值。 (这一切都有效) 如果没有找到任何内容,请发送电子邮件并终止该进程,我正在使用 die()< /a> 停止该进程。 如果找到结果,则继续进程并返回 XMLRPC 的值(如果查询返回任何结果,这部分工作,但如果未找到结果,则会出错)
如何终止进程并仍将某些内容返回到 XMLRPC称呼?
我想我可以重新编码这个功能(这将是正确的方法)只是认为模具会返回一些东西,而不仅仅是将一些东西打印到终端日志中
I have a Zend XMLRPC web service running, but in my class I need the script to die gracefully and would like XMLRPC not to throw an error. Is this possible?
Over view
XMLRPC client starts the call that starts an instance of a class,
XMLRPC client passes query value to the object
if query doesn't return a value I need the script to email me with the query and the value passed for debugging. (This all works)
If nothing is found, send email and kill the process, I'm using the die() to stop the process.
If results are found moves on in the process and returns a value for the XMLRPC (this part work if the query returns any results, but errors out if no results are found)
How can I kill the process and still return something back to the XMLRPC call?
I guess I could recode this functionality (this would be the correct way) just thought the die would return something and not just print something to the terminal logs
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,进程不能终止或退出,必须向 XMLRPC 请求返回错误消息。使用 die() 或 exit() 会导致 XMLRPC 抛出错误,从而完全中断进程。现在是时候重新编码了
unfortunately the process can not die or exit, you must return a error message to the XMLRPC request. Using the die() or exit() results in XMLRPC throwing an error which breaks the process altogether. Now time to recode