无喱头
(无喱头)
论坛元老
 
扯蛋仙
UID 24846
精华
3
积分 5957
帖子 1152
金钱 5893 喜悦币
威望 30
人脉 34
阅读权限 90
注册 2003-11-26
状态 离线
|
[推荐阅读] 分享自己的smarty心得
不错,越来越有JAVA风格了。。。
<?php // Use Zend_Feed require_once 'Zend/Feed.php';
// Fetch the latest Slashdot headlines try { $slashdotRss = Zend_Feed::import('http://rss.slashdot.org/Slashdot/slashdot'); } catch (Zend_Feed_Exception $e) { // feed import failed echo "Exception caught importing feed: {$e->getMessage()}n"; exit; }
// Initialize the channel data array $channel = array( 'title' => $slashdotRss->title(), 'link' => $slashdotRss->link(), 'description' => $slashdotRss->description(), 'items' => array() );
// Loop over each channel item and store relevant data foreach ($slashdotRss as $item) { $channel['items'][] = array( 'title' => $item->title(), 'link' => $item->link(), 'description' => $item->description() ); } ?>
|  http://www.phpsoho.com 重新开启 |
|