我想在我的Codeigniter项目中包含Threema库,但是我很难做到。 This is the library. 我按照说明,用作曲家创建了一个自动加载,但我不知道如何让它工作。我有一个看起来像这样的帮手:
require_once APPPATH . "libraries/Threema/vendor/autoload.php";
//define your connection settings
$settings = new ConnectionSettings(
'*xxxxx',
'xxxxxx'
);
$publicKeyStore = new Threema\MsgApi\PublicKeyStores\File("pathTo/threema_key.php");
$connector = new Connection($settings, $publicKeyStore);
我有错误:
Class' ConnectionSettings'找不到
我尝试使用关键字"使用"作为指南。但这也不起作用:
use Threema\MsgApi\Connection;
use Threema\MsgApi\ConnectionSettings;
use Threema\MsgApi\Receiver;
在CodeIgniter环境中安装此库的简单方法是什么?
答案 0 :(得分:0)
尝试更改此行
require $SERVER['DOCUMENT_ROOT'] ./'libraries/Threema/vendor/autoload.php';