【问题标题】:Returning errors from AMFPHP on purpose故意从 AMFPHP 返回错误
【发布时间】:2010-03-19 20:43:40
【问题描述】:

当通过 amfphp 使用 flash 远程处理时,我可以在 php 中编写什么来触发我在 Flash 中的 Responder 中设置的“状态”方法?

或者更一般地说,我如何确定服务调用是否失败?对我来说理想的解决方案是在 php 服务器端抛出一些异常,并在 flash 客户端捕获该异常......其他人如何使用 flash 远程处理服务器错误?

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);

【问题讨论】:

  • 对不起,我不能关注你,请清理你的问题,你可以得到快速的帮助

标签: php flash actionscript-3 remoting amfphp


【解决方案1】:

我发现我做错了什么。从 php 调用 throw 将正确触发 Responder 的错误处理程序,但我用来嗅探网络流量的工具妨碍了调用并弄乱了调用。

【讨论】:

    猜你喜欢
    • 2012-11-25
    • 1970-01-01
    • 1970-01-01
    • 2021-01-11
    • 1970-01-01
    • 2016-08-10
    • 2022-11-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多