Php 带参数的Codeigniter自动加载库

Php 带参数的Codeigniter自动加载库,php,codeigniter,autoload,filemaker,Php,Codeigniter,Autoload,Filemaker,我和Codeigniter一起使用来访问Filemaker数据库。库和配置文件在config/autoload.php中自动加载 这个设置在我的开发机器(OSX,PHP5.3.14)上运行得非常好。然而,当我在我们的开发服务器(UbuntuPrecise,PHP5.3.10)上运行该项目时,它不起作用。似乎存在配置参数未传递到库的问题。我收到以下错误消息: Severity: Notice Message: Undefined index: dataServer Filename: libra

我和Codeigniter一起使用来访问Filemaker数据库。库和配置文件在config/autoload.php中自动加载

这个设置在我的开发机器(OSX,PHP5.3.14)上运行得非常好。然而,当我在我们的开发服务器(UbuntuPrecise,PHP5.3.10)上运行该项目时,它不起作用。似乎存在配置参数未传递到库的问题。我收到以下错误消息:

Severity: Notice
Message:  Undefined index: dataServer
Filename: libraries/CIFX.php
Line Number: 9

Severity: Notice
Message:  Undefined index: dataPort
Filename: libraries/CIFX.php
Line Number: 9

Severity: Notice
Message:  Undefined index: dataType
Filename: libraries/CIFX.php
Line Number: 9

Severity: Notice
Message:  Undefined index: dataURLType
Filename: libraries/CIFX.php
Line Number: 9
My libraries/CIFX.php文件如下所示:
require('FX.php');

class CIFX extends FX {

    function __construct ($params = array())
    {
        parent::__construct($params['dataServer'], $params['dataPort'], $params['dataType'], $params['dataURLType']);
    }

}
?>
我的config/CIFX.php文件如下所示:

require('FX.php');

class CIFX extends FX {

    function __construct ($params = array())
    {
        parent::__construct($params['dataServer'], $params['dataPort'], $params['dataType'], $params['dataURLType']);
    }

}
?>
$config['dataServer'] = '192.168.1.10';
$config['dataPort'] = '80';
$config['dataType'] = 'FMPro7';
$config['dataURLType'] = '';
$config['dbuser'] = '';
$config['dbpassword'] = '';
根据调查,这应该是可行的


非常感谢任何帮助

初始化类时需要传递参数

$params = array(
    'dataServer' =>  $this->config->item('dataServer');, 
    'dataPort'   =>  $this->config->item('dataPort');
);

$this->load->library('CIFX ', $params);

正如我在我的原始文章中所写,库是使用CI的自动加载功能加载的。用户手册对此做了如下说明:“您还可以传递存储在配置文件中的参数。只需创建一个与类文件名同名的配置文件,并将其存储在您的应用程序/config/文件夹中。”这是我在本地计算机上做的工作,但不是在开发服务器上。