我是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");
}
}
谢谢
您将不得不为任何人添加一些代码,以便能够解决您的问题。 – kevindeleon
我已添加代码,请查看并让我知道下一步。谢谢 – arajks