映射PHP和Flex对象
我正在使用ZendAMF进行远程处理映射PHP和Flex对象,php,apache-flex,zend-framework,amf,zend-amf,Php,Apache Flex,Zend Framework,Amf,Zend Amf,我正在使用ZendAMF进行远程处理 <?php error_reporting(E_ALL | E_STRICT); //error reporting, not needed require_once "Zend/Amf/Server.php"; //the zendAMF server require_once "process.php"; //our test class $server = new Zend_Amf_Server(); //d
<?php
error_reporting(E_ALL | E_STRICT); //error reporting, not needed
require_once "Zend/Amf/Server.php"; //the zendAMF server
require_once "process.php"; //our test class
$server = new Zend_Amf_Server(); //declare the server
$server->setClass("process"); //load our test-class to the server
$server->setClassMap("Session", "Session");
echo($server->handle()); // needed to start the server
?>
谢谢。您需要做一些不同的事情。通常,它类似于添加 [RemoteClass(alias=“Session”)] 添加到AS类的元数据,或者在PHP对象中使用Zend_Amf的函数(如getASClassName())之一。查看韦德·阿诺德(Zend_Amf的作者)关于类映射的屏幕广播。我相信他会得到你的答案
TypeOne错误是正确的;你需要
[RemoteClass(alias="Session")]
[Bindable]
在ActionScript类的顶部
我确定的其他一些事情可能会导致此问题:
- 类变量必须是公共的,并且具有相同的名称
- ActionScript类不应具有已定义的构造函数
[RemoteClass(alias="Session")]
[Bindable]