douzhengzuo7283 2013-03-26 03:24
浏览 31
已采纳

AMFPHP如何访问amfphp以外的类

My class log is in directory:

www/includes/classes/log.php

with a method

public function add($type){
    if($type!=''){
        $this->addRow($type);
    }
}

AmfPHP class abc exist in directory

www/game/r1/amfphp-file/serv/xyz.php

it has a function which calls above method like this

$log = new log();
$log->add('gameStart');

The problem comes in my flash game AS3: NetConnection.Call.BadVersion

when I remove these lines game runs fine (without any trouble):

//$log = new log();
//$log->add('gameStart');

what I have figured out that my external class is not accessible or ...

  • 写回答

1条回答 默认 最新

  • duandai0373 2013-03-27 00:32
    关注

    "bad version" means that you probably have some PHP error message that is being output. This corrupts your return data.

    See www.silexlabs.org/amfphp/documentation/troubleshooting-and-debugging-your-project/ especially What is “NetConnection.Call.BadVersion”?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部