How do we connect sitemap.xml on PHP with help include?
-
I have a sitemap.xml
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"><url<loc>http://site.ru/</loc></url><url><loc>http://site.ru/filmebi.php</loc</url><url><loc>http://site.ru/musika.php</loc>
And the PHP code where I have this code:
switch($Page){ case "index": include_once('resource/main.php'); break; case "aboutus": include_once('resource/about.php'); break; case "ads": include_once('resource/ads.php'); break; case "news": include_once('resource/news.php'); break; case "sitemap.xml": //тут у меня проблема include_once('sitemap.xml' ); break; case "robots.txt": include_once('robots.txt'); break; default: include_once('error/error404.php');
Specified
include_once('sitemap.xml' );
But he makes such a mistake:Parse error: syntax error, unexpected T_STRING in D:\OpenServer\domains\testi.dev\sitemap.xml on line 1
What am I gonna do?
-
Team include serves for inclusion PHP code♪
The file is no code.
Consequently, the team should not be used for this file.What am I gonna do?
Give this file a direct link.