我正在尝试使用AMF PHP将变量传递给flash文件,到目前为止,我看不出我的代码有任何错误,但我几乎没有创建类的经验,所以它是这样的,这是我的代码,
index.php:
<?php
include "amfphp/services/flashMe.php";
$session = true;
if ($session == true) {
$uid = '12345';
$thing = new flashMe;
$thing->push($uid);
} else {
//login
}
?>flashMe.php:
<?php
class flashMe {
public function __construct() {
}
public function push($one)
{
return $one;//sends the uid to the flash file?
}
}
?>Flash正在寻找flashMe类和该类中的push方法,但当我运行它时,我的flash文件中的变量总是为空,这段代码有什么问题吗?
提前感谢!
发布于 2010-07-12 10:06:20
Amfphp或Zend AMF只允许您在网关公开的远程类上调用公共方法。您的示例不是类,因此不能调用任何远程方法。这看起来更像是您使用http post所做的事情。
http://framework.zend.com/manual/en/zend.amf.server.html
https://stackoverflow.com/questions/3212607
复制相似问题