外部ライブラリを ExpressionEngine プラグインにロードしようとしていますが、次のようになります。
メッセージ: 未定義のプロパティ: 検出器::$EE
プラグイン自体には、次のものがあります。
public function __construct()
{
$this->EE->load->library('detector');
$this->EE =& get_instance();
}
私のフォルダは次のように設定されています:
検出器-
ライブラリ
--Detector.php
-pi.detector.php
私は何を間違っていますか?
ライブラリの読み込みエラーを回避した後、次のコードで「未定義の変数」エラーが発生しました。
public function detector()
{
return $ua->ua;
}
public function user_agent()
{
return $ua->ua;
}
それは、テンプレートに {exp:detector:user_agent} がある場合です。{exp:detector} の場合、何も出力されません。