Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/flash/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何从Flash Media Server 3.5连接到Zend_Amf_Flash_Zend Framework_Flash Media Server_Zend Amf - Fatal编程技术网

如何从Flash Media Server 3.5连接到Zend_Amf

如何从Flash Media Server 3.5连接到Zend_Amf,flash,zend-framework,flash-media-server,zend-amf,Flash,Zend Framework,Flash Media Server,Zend Amf,我希望能够从flash media server 3.5连接到Zend_Amf(最新ZendFramework版本)。我试着做了以下几点: function amfresponder ( ) { this.onResult = function (result) { trace("Success: " + String(result)); }; this.onStatus = function (fault) { trace("Error: "+ fault.descriptio

我希望能够从flash media server 3.5连接到Zend_Amf(最新ZendFramework版本)。我试着做了以下几点:

function amfresponder ( ) {
this.onResult = function (result) {
    trace("Success: " + String(result));
};
this.onStatus = function (fault) {
    trace("Error: "+ fault.description);
};
};


application.onConnect = function(client) {

myResponder = new amfresponder();

connection = new NetConnection();

connection.connect("http://localhost/AmfServer.php");
trace("checking connection");
connection.call("isConnected",myResponder);

return true;    
}
我在apache访问日志中看到对AmfServer.php的请求 但是没有返回任何内容,甚至没有错误消息。在fms管理日志中,我只看到“检查连接”

更新 另一种方法:

application.isFine_Status = function(info) {
  for(var item in info) {
    trace(item + " " + info[item]);
  } 
}

application.isFine_Result = function(res) {
    trace(res);
}

application.onAppStart = function() {
trace("application started");
NetServices.setDefaultGatewayUrl("http://localhost/AmfServer.php");
    this.gatewayconn = NetServices.createGatewayConnection();   
    this.pservice = this.gatewayconn.getService('PrivateFunc',this);
    this.pservice.isFine();
}
Zend_Amf类是:

set_include_path(get_include_path().PATH_SEPARATOR.realpath(__DIR__.'/../').PATH_SEPARATOR.realpath(__DIR__.'/../../include/PEAR-R2'));

require_once('Zend/Amf/Server.php');
require_once('PrivateFunc.php');

$server = new Zend_Amf_Server();
$server->setClass('PrivateFunc','PrivateFunc');
$response = $server->handle();
echo $response;

在这两种情况下,我都没有结果。有什么想法吗?

好的,所以经过大量研究,目前似乎不可能实现从adobe flash media server到zend_amf的正确连接

我解决了这个问题,从AdobeFlashMedia服务器转移到它的免费解决方案red5。
red5是基于java的,它提供了一种非常强大的编程语言,因此我将相关代码从php转换为java,所有操作(数据库操作)都是在red5中完成的,php并不是所有需要的。

好的,所以经过大量研究,目前似乎不可能实现从adobe flash media server到zend_amf的正确连接

我解决了这个问题,从AdobeFlashMedia服务器转移到它的免费解决方案red5。
red5是基于java的,它提供了一种非常强大的编程语言,因此我将相关代码从php转换为java,所有操作(数据库操作)都是在red5中完成的,php并不是所有需要的。

您可能想尝试下面的代码

setClass(“PrivateFunc”); //需要启动服务器 $handle=$server->handle(); 回声($handle); //echo($server->handle());
?>您可能需要尝试下面的代码

setClass(“PrivateFunc”); //需要启动服务器 $handle=$server->handle(); 回声($handle); //echo($server->handle());
?>我在中看到了更多信息,但仍然没有合适的解决方案我在中看到了更多信息,但仍然没有合适的解决方案