APNS-PHP を使用して PN を送信することに成功しました。
ただし、これを Code Igniter プロジェクト (コマンド ラインから呼び出されるコントローラー内) に追加する方法に少し行き詰まっています。
呼び出し:
require_once APPPATH.'/third_party/ApnsPHP/Autoload.php';
エラーが発生します:
Fatal error: Uncaught exception 'Exception' with message 'Class file
'XXXXXXX/application/third_party/CI/DB/mysql/result.php' does not
exists' in XXXXXXX/application/third_party/ApnsPHP/Autoload.php:49
ある種のオートロードの競合だと思いますか?しかし、よくわかりません!
どんな助けでも素晴らしいでしょう-私はあまり運がなくてもGoogleをトロールしました!
関数内で使用しようとしている行は次のとおりです。
require_once APPPATH.'/third_party/ApnsPHP/Autoload.php';
Ion Auth のライブラリをロードするために追加した __autoload 関数は次のとおりです。
function __autoload($class)
{
if (strpos($class, 'CI_') !== 0)
{
if (file_exists($file = APPPATH.'core/'.$class.EXT))
{
include $file;
}
else if (file_exists($file = APPPATH.'libraries/'.$class.EXT))
{
include $file;
}
else if (file_exists($file = APPPATH.'core/base_controllers/'.$class.EXT))
{
include $file;
}
}
}