本文整理汇总了PHP中Sitemap::generateGoogleSitemap方法的典型用法代码示例。如果您正苦于以下问题:PHP Sitemap::generateGoogleSitemap方法的具体用法?PHP Sitemap::generateGoogleSitemap怎么用?PHP Sitemap::generateGoogleSitemap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sitemap
的用法示例。
在下文中一共展示了Sitemap::generateGoogleSitemap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$s->addItem($loc, $lastmod, DEPARTMENT_CHANGEFREQ, DEPARTMENT_PRIORITY);
}
}
#======================== OTHER LINKS =====================
#Contact Form
$s->addItem($libFunc->m_safeUrl(SITE_URL . "index.php?action=contactus"), '', OTHER_CHANGEFREQ, "0.9");
#Search
$s->addItem($libFunc->m_safeUrl(SITE_URL . "ecom/index.php?action=ecom.search"), '', OTHER_CHANGEFREQ, OTHER_PRIORITY);
#Registration Form
$s->addItem($libFunc->m_safeUrl(SITE_URL . "user/index.php?action=user.signupForm"), '', OTHER_CHANGEFREQ, OTHER_PRIORITY);
#accessibility Page
$s->addItem($libFunc->m_safeUrl(SITE_URL . "index.php?action=cms&mode=accessibility"), '', OTHER_CHANGEFREQ, OTHER_PRIORITY);
#Dynamic Sitemap
$s->addItem($libFunc->m_safeUrl(SITE_URL . "index.php?action=sitemap"), '', SITEMAP_CHANGEFREQ, OTHER_PRIORITY);
#T&C
$s->addItem($libFunc->m_safeUrl(SITE_URL . "index.php?action=cms&mode=conditions"), '', OTHER_CHANGEFREQ, OTHER_PRIORITY);
#Privacy
$s->addItem($libFunc->m_safeUrl(SITE_URL . "index.php?action=cms&mode=privacy"), '', OTHER_CHANGEFREQ, OTHER_PRIORITY);
// output sitemap
if (isset($_GET['target'])) {
// generate Google sitemap
if (($target = $_GET['target']) == 'google') {
echo $s->generateGoogleSitemap();
} else {
if ($target == 'yahoo') {
echo $s->generateYahooSitemap();
}
}
#elseif
}
#if