2014-04-22 52 views
1

我是Amfphp + codeignitor的新手,我无法看到问题amfphp 2.2, index.php gives fatal error?的答案,或者我不清楚。致命错误:无法使用stdClass类型的对象 - amphphp

我跟着 http://www.nunomira.com/blog/2012/03/codeigniter-2-0-3-with-amfphp-2-0/

我收到了同样的错误在这里提到的过程 - 致命错误:无法使用类型stdClass的对象为数组中的d:\虚拟主机\网站\程序\库\ AMFPHP \插件\ AmfphpMonitor \ AmfphpMonitor.php on line 167

不知道我在做错误。 http://localdomain.com/index.php/amf/gateway是我正在尝试的网址。

如何纠正?问题是什么?如果问题解决了,我会看看服务浏览器吗?

专家请指导我在此...

下面是代码

文件夹结构

-controllers 
-amf 
    -services 
    -Testservice.php 
    -Gateway.php 

-libraries 
-Amfphp (Amfphp folder) 

Gateway.php

<?php 
require_once APPPATH . "/libraries/Amfphp/ClassLoader.php"; 
class Gateway extends CI_Controller 
{ 
     function __construct() 
     {  
       parent::__construct(); 
     } 
     function index() 
     { 
       $config = new Amfphp_Core_Config();//do something with config object here 
       $config->serviceFolders = array(dirname(__FILE__) . "/services/"); 
       $gateway = Amfphp_Core_HttpRequestGatewayFactory::createGateway($config); 

       $gateway->service(); 
       $gateway->output(); 
     } 
} 

Testservice.php

<?php 

class Testservice extends CI_Controller { 
     public function getMessage() 
     { 
      return array("param1" => "param1"); 
     } 
} 

谢谢

+0

您将不得不为任何人添加一些代码,以便能够解决您的问题。 – kevindeleon

+0

我已添加代码,请查看并让我知道下一步。谢谢 – arajks

回答

2

有人指出类似的问题,并已修复但尚未发布。你可以尝试用这个替换你的AmfphpMonitor.php代码吗? https://github.com/silexlabs/amfphp-2.0/blob/master/Amfphp/Plugins/AmfphpMonitor/AmfphpMonitor.php

+0

我按照你的建议更换了 - 现在正在工作。现在页面显示“Amfphp入口点,这是您必须发送请求来处理它们的URL。”非常感谢 – arajks

+0

@Ariel修复还没有发布!你能告诉我什么时候会发生吗?暂时我已经从github复制代码。 –

+0

还没有发布,我的道歉。我应该有时间在本月底发布。当它完成时我会在这里更新 –

相关问题