<?php header("Content-type:text/html;charset=utf-8"); //php生成百度站点地图sitemap.xml //http://www.baidu.com/search/sitemaptools_help.html include("../config.inc.php"); mysql_connect($CFG['db_host'] ,$CFG['db_user'],$CFG['db_pass']) or die
我的MvcSiteMap地图主要由实体文件,XML配置文件,C#调用文件组成,当然为了前台调用方法,可以为HtmlHelper添加一个扩展方法 第一步 定义站点地图实体 public class MvcSiteMap { [XmlAttribute] public int ID { get; set; } [XmlAttribute] public string Title { get; set; } [XmlAttribute] public string Url { get; set; }