根据网址生成页面的方法:

 

C#代码  C#根据网址生成静态页面
  1. bool CreateHtmlFile(string url, string path)  
  2. {   
  3. //http://keleyi.com/a/bjae/3d10wfax.htm  
  4.   
  5. string m_content = Utils.GetHtmlByUrl(Utils.GetAbsolutePath() + url, Encoding.UTF8);  
  6. if (m_content == string.Empty)  
  7. {  
  8. return false;  
  9. }  
  10.   
  11. Utils.CreateFile(m_content, Utils.GetMapPath(path), Encoding.UTF8);  
  12. return true;  

 

具体可以到 http://hovertree.codeplex.com下载源代码。

最新开发版本请打开http://hovertree.codeplex.com/SourceControl/latest#readme.txt
然后点击Clone右边的Download下载。

生成静态页面的好处:
静态网站最大优势是访问速率非常快,对搜索引擎收录支持非常友好,节约网站服务器的资源。

相关文章:

  • 2021-07-21
  • 2022-12-23
  • 2022-03-05
  • 2021-05-27
  • 2021-10-22
  • 2022-12-23
  • 2021-05-30
猜你喜欢
  • 2022-12-23
  • 2021-09-21
  • 2022-12-23
  • 2022-12-23
  • 2021-08-31
  • 2022-12-23
相关资源
相似解决方案