本文整理汇总了PHP中UniversalFeedCreator::_generateFilename方法的典型用法代码示例。如果您正苦于以下问题:PHP UniversalFeedCreator::_generateFilename方法的具体用法?PHP UniversalFeedCreator::_generateFilename怎么用?PHP UniversalFeedCreator::_generateFilename使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UniversalFeedCreator
的用法示例。
在下文中一共展示了UniversalFeedCreator::_generateFilename方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FeedItem
$objRss->title = $arrGMeta[$strModuleID]['meta']['Title'] . 'RSS订阅 -' . $arrGWeb['name'];
$objRss->description = $arrGMeta[$strModuleID]['meta']['Description'] . 'RSS订阅 -' . $arrGWeb['name'];
$objRss->descriptionTruncSize = 500;
$objRss->descriptionHtmlSyndicated = true;
$objRss->link = $strDomain . "/" . $strModuleID . '/';
$objRss->syndicationURL = $strDomain . '/' . $_SERVER["PHP_SELF"];
foreach ($arrInfoList as $key => $val) {
$objItem = new FeedItem();
$objItem->title = $val['title'];
$strDir = ceil($val['id'] / $arrGCache['cache_filenum']);
if ($arrGWeb['URL_static']) {
if ($arrGWeb['file_static']) {
$strUrl = $strDomain . '/' . $arrGWeb['cache_url'] . '/' . $strModuleID . '-' . $strDir . '/' . $val['id'] . $arrGWeb['file_suffix'];
} else {
$strUrl = $strDomain . '/' . $strModuleID . '/detail/id-' . $val['id'] . $arrGWeb['file_suffix'];
}
} else {
$strUrl = $strDomain . '/' . $strModuleID . '/detail.php?id=' . $val['id'];
}
$objItem->link = $strUrl;
$objItem->description = $val['summary'];
//optional
$objItem->descriptionTruncSize = 500;
$objItem->descriptionHtmlSyndicated = true;
$objItem->date = strtotime($val['submit_date']);
$objItem->source = $strDomain;
$objItem->author = $_SERVER['HTTP_HOST'];
$objRss->addItem($objItem);
}
echo $objRss->saveFeed("RSS2.0", $arrGSmarty['cache_dir'] . $objRss->_generateFilename());