Je suis en train de créer un sitemap en codeignite. Mais je suis confronté à une erreur avec sitemap. Quelqu'un me dit ce qu'est l'erreur.codeigniter sitemap ne fonctionne pas
Controller: -
public function sitemap()
{
header("Content-Type: text/xml;charset=iso-8859-1");
$this->load->view("sitemap");
}
Vue: -
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.example.com/</loc>
<lastmod>2005-01-01</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
erreur: -
XML Parsing Error: XML or text declaration not at start of entity Location: http://localhost/project/index.php/sitemap.xml Line Number 2, Column 1: ^
changer le nom de fichier de 'sitemap.xml' à' sitemap.php' – Beldion
je développe sitemap dans codeigniter dans ce cadre accepter seulement .php donc j'ai déjà créé sitemap.php – teena