我正在寻找如何在使用CodeIgniter框架开发的网站中集成QuickBase API 我esayer将api添加为库
$this->load->library('quickbase', 'login','password', true, 'table');
当我这样做时,我会调用显示错误
A PHP Error was encountered
Severity: Warning
Message: Missing argument 1 for QuickBase::__construct(), called in /var/www/vhosts/************/httpdocs/system/core/Loader.php on line 1099 and defined
Filename: libraries/quickbase.php
Line Number: 43
A PHP Error was encountered
Severity: Warning
Message: Missing argument 2 for QuickBase::__construct(), called in /var/www/vhosts/**************/httpdocs/system/core/Loader.php on line 1099 and defined
Filename: libraries/quickbase.php
Line Number: 43
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: un
Filename: libraries/quickbase.php
Line Number: 45
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: pw
Filename: libraries/quickbase.php
Line Number: 49
提前谢谢
答案 0 :(得分:0)
您的错误是因为Quickbase API文件与CodeIgniter库的调用格式不同,需要使用load->library
语法。您需要阅读本手册的Creating Libraries部分,然后创建自己的CodeIgniter兼容的Quickbase库,其中包含Quickbase API的文件。