当在amfphp中使用Flash remoting时,我可以在php中写什么来触发我在flash响应器中设置的'status‘方法?
或者更一般地说,我如何确定服务调用是否失败?对我来说,理想的解决方案是在php服务器端抛出一些异常,然后在flash客户端捕获该异常……其他人如何使用flash remoting处理服务器错误?
var responder = new Responder(
function() {
trace("some normal execution finished successfully. this is fine.");
}, function(e) {
trace("how do I make this trigger when my server tells me something bad happened?");
}
);
myService = new NetConnection;
myService.connect("http://localhost:88/amfphp/gateway.php");
myService.call("someclass.someservice", responder);发布于 2010-03-20 06:01:52
我发现我做错了什么。从php调用throw将正确地触发Responder的错误处理程序,但我用来嗅探网络流量的工具阻碍了调用并使调用变得混乱。
https://stackoverflow.com/questions/2480470
复制相似问题