求教tp开启amf模式的问题!

浏览:382 发布日期:2014/08/07 分类:求助交流
我想使用amf模式,在入口文件添加了define('MODE_NAME', 'amf');在配置文件'APP_AMF_ACTIONS' => 'Index',在http://localhost/kaixin/index.php/Admin/Index路径下的IndexAction.class.php写了
class IndexAction extends Action {
public function index($user){
return 'php返回给AS:'.$user;

}
}
然后flex代码

<![CDATA[
import flash.net.Responder;
import flash.net.NetConnection;
private var gateway_url:String = "http://localhost/kaixin/index.php/Admin";
private var geteway_conn:NetConnection = new NetConnection();
public function callAmfPHP(str:String):void
{
geteway_conn.connect(gateway_url);
geteway_conn.call("Index.index", new Responder(onResult, onFault), str);
}
private function onResult(result:object):void
{
amfphptest.text = result.toString();
}
private function onFault(fault:String):void
{
amfphptest.text = fault;
}
]]>
测试来测试去总报错!为什么啊?
最佳答案
评论( 相关
后面还有条评论,点击查看>>