Website maps are vital to a website.
To create a website map, you can easily use online tools such as http://www.xml-sitemaps.com /. It allows you to create up to 500 page website maps for free, in a variety of formats.
It is better to create a website map and submit it to the search engine. In this way, you are not limited by the number of pages, and can fully control the structure information of the website map.
Here is a small class. Check the source code. Easy to use. There are good demo examples.
'Sitemapgenerator. php '= SitemapGenerator ("http://your.app.com/"-> addUrl ("http://your.app.com", ('C'), 'daily', '1'-> addUrl ("http://your.app.com/page1 ", ('C'), 'daily ', '0. 5 '-> addUrl ("http://your.app.com/page2", ('C'), 'daily'-> addUrl ("http://your.app.com/page3 ", ('C'-> addUrl ("http://your.app.com/page4"-> addUrl ("http://your.app.com/page/subpage1", ('C'), 'daily ', '0. 4 '-> addUrl ("http://your.app.com/page/subpage2", ('C'), 'daily'-> addUrl ("http://your.app.com/page/subpage3 ", ('C'-> addUrl ("http://your.app.com/page/subpage4"-> View Code
It is really convenient.