Codeigniter で SimplePie を使用しようとしていますが、simplepie ライブラリを読み込もうとすると、ビューを表示することさえできません。Haughin CodeIgniter ライブラリ ( http://www.haughin.com/code/simplepie/ ) をダウンロードして、applications/libraries フォルダーに配置しましたが、何も機能しません。私は以下のコードを持っていますが、それが何であるかは問題ではありません.simplepieをロードしようとしている限り、何も出力されません. エラーログには次のように書かれています:
zend_mm_heap corrupted
以下のコードは、Haughin のサイトからコピーしたものです。
これが私のコントローラーです:
function index()
{
$this->load->library('simplepie');
$this->simplepie->set_feed_url('http://feeds.haughin.com/haughin');
$this->simplepie->set_cache_location(APPPATH.'cache/rss');
$this->simplepie->init();
$this->simplepie->handle_content_type();
$data['rss_items'] = $this->simplepie->get_items();
$this->load->view('chatter/ch_index', $data);
}
これが私の見解です:
<?php
echo "<li>";
foreach($rss_items as $item) {
echo "<li>";
echo "<a href='" .$item->get_link() . "'>";
echo $item->get_title();
echo "</a>";
echo "</li>";
}
echo "</li>";
?>
何かご意見は?