本文整理汇总了PHP中osC_DateTime::getTimestamp方法的典型用法代码示例。如果您正苦于以下问题:PHP osC_DateTime::getTimestamp方法的具体用法?PHP osC_DateTime::getTimestamp怎么用?PHP osC_DateTime::getTimestamp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osC_DateTime
的用法示例。
在下文中一共展示了osC_DateTime::getTimestamp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _createArticleSitemap
function _createArticleSitemap()
{
global $osC_Database;
$num_of_entries = 0;
$num_of_article_file = 0;
$Qarticles = $osC_Database->query('select articles_id , if( articles_last_modified is null || articles_last_modified in (\'0000-00-00 00:00:00\'), articles_date_added, articles_last_modified ) as last_modified from :table_articles order by articles_order asc, articles_id asc');
$Qarticles->bindTable(':table_articles', TABLE_ARTICLES);
$Qarticles->execute();
$handle = $this->_createSitemapFile('Articles');
$this->_writeFile($handle, $this->_createXmlHeader());
while ($Qarticles->next()) {
$location = $this->_base_url . $this->_hrefLink(FILENAME_INFO, 'articles&articles_id=' . $Qarticles->valueInt('articles_id'));
$last_mod = date("Y-m-d", osC_DateTime::getTimestamp($Qarticles->value('last_modified')));
$change_freq = $article_change_frequency;
$this->_writeSitemapFile($handle, $this->_createUrlElement($location, $last_mod, $this->_articles_change_freq, $this->_articles_priority), $num_of_entries, $num_of_article_file, 'Article');
}
$Qarticles->freeResult();
$this->_closeSitemapFile($handle);
return true;
}