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