本文整理匯總了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());