문제

언급하고 싶었습니다. 개발 환경에서 SimplePie가 작업하고 있지만 사이트를 업로드하자마자 홈페이지에 피드를 얻을 수 없습니다. 어떤 아이디어? LocalHost에서 작동하는 코드는 다음과 같습니다.

function Homepage()
{
   parent::Controller();
   $this->base = $this->config->item('base_url');
   $this->css = $this->config->item('css');
   $this->images = $this->config->item('images');
   $this->load->library('simplepie');
   $this->simplepie->set_feed_url('http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/world/rss.xml');          
   $this->simplepie->set_cache_location(APPPATH.'cache/rss');
   $this->simplepie->init();
   $this->simplepie->handle_content_type();
}

function index()
{
  $data['rssdata'] = array(
    "title" => $this->simplepie->get_title(),
    "description" => $this->simplepie->get_description(),
    "items" => $this->simplepie->get_items(0,5)
    );
    $this->load->view($data)
}

this is the code that is in the view:

 <h3 class="ui-widget-header"><?= $rssdata['title']?></h3>
<div id="accordion" >
<div>
<h5><?= $rssdata['description']?></h5>
<p><?php foreach($rssdata['items'] as $item) :?>
<ul>
<li><?php anchor($item->get_link(),$item->get_title());?></li>
<li class="rssfeed"><?php echo $item->get_description();?></li>
</ul>
<p><small>Posted on <?php echo $item->get_date('j F Y g:i a');?></small></p>
<?php endforeach;?>
</div>
도움이 되었습니까?

해결책

GitHub 프로파일에서 최신 "블리드 에지"를 사용하면 PHP 5.3의 몇 가지 문제를 해결하여 Apache가 너무 많은 오류에서 폭발하게 만들었습니다.

글을 쓰는 시점에서 출혈 가장자리는 다음과 같이 표시됩니다. v1.2.1-dev.

다른 팁

호스팅 설정이 컬을 설치하지 않았고 Error_Reporting이 꺼져있을 때이 문제가 한 번 발생했습니다 ....

설정해보십시오 var $force_fsockopen = false; 에게 var $force_fsockopen = true; SimplePie 구성 파일에서 차이가 있는지 확인합니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top