´ÓÊý¾Ý¿âÖÐȡֵÅúÁ¿Éú³ÉhtmlÎļþ
1. web.config
<connectionStrings>
<add name ="myconn" connectionString="Data Source=who\SQLEXPRESS; Initial Catalog=dbname;Integrated Security=True;" providerName="System.Data.SqlClient"/>
</connectionStrings>
2.
string htmlPath = "D:\\htmlFiles";
string[] files = Directory.GetFiles(htmlPath,"*.html");
foreach (string filename in files)
{
File.Delete(filename);
}
3.
string conn = ConfigurationManager.ConnectionStrings["myconn"].ToString();
SqlConnection sqlconn = new SqlConnection(conn);
SqlCommand scom = new SqlCommand("select * from table",sqlconn);
SqlDataAdapter sda = new SqlDataAdapter(scom);
DataSet ds = new DataSet();
sda.Fill(ds);
if (ds.Tables[0].Rows.Count > 0)
{
writeHtml(ds);
}
4.
foreach (DataRowView drv in dv)
{
int pid = int.Parse(drv["pid"].ToString().Trim());
string id_name = drv["ID_Name"].ToString().Trim();
string en_title = drv["en_title"].ToString().Trim();
string en_contents = drv["en_contents"].ToString();
string htmlName = String.Format("{0:D4}{1}.html",pid,id_name);
htmlName = htmlName.Replace(' ','_');
htmlName = htmlName.Replace('/','_');
htmlName = htmlName.Replace(':','_');
string htmlContents = "<html><head><title>" + en_title + "</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\"><LINK href="\" mce_href="\""css.css\" type=\"text/css\" rel=\"stylesheet\"></head><body><table><tbody><tr valign=\"top\"><td valign=\"top\" height=\"467\" width=\"696\">" + en_contents + "</td></tr></tbody></
Ïà¹ØÎĵµ£º
ÓÃapache 2µÄmod_ext_filter¸øhtmlÎļþ¼Ó¹ã¸æ¡£
ÏëÔÚ¾²Ì¬Ò³ÃæÉÏ×Ô¶¯¼Ó¸ö¹ã¸æÌõ£¬¶ø²»±ØÊÖ¶¯ÐÞ¸Äÿ¸ö¾²Ì¬Ò³Ãæ¡£
°´ÕÕÕâ¸öÐèÇóÔÚgoogleÉÏÕÒÁËÒ»¶Îʱºò£¬²»µÃÒªÁì¡£
ºóÀ´ÏëÆðÀ´tomcatÀïÓÐfilterµÄ¸ÅÄîµÄ¡£
¾Íµ½apacheµÄÎĵµÀïÕÒ¡£
ϹèÅöµ½ÁËÕâ¸öËÀºÄ×Ó¡£
http://httpd.apache.org/docs/2.0/mod/mod_ext_filter.html
ÓÉ ......
ʲôÊÇ HTML Îļþ£¿
HTML Ö¸³¬Îı¾±êÇ©ÓïÑÔ¡£
HTML ÎļþÊǰüº¬Ò»Ð©±êÇ©µÄÎı¾Îļþ¡£
ÕâЩ±êÇ©¸æËß WEB ä¯ÀÀÆ÷ÈçºÎÏÔÊ¾Ò³Ãæ¡£
HTML Îļþ±ØÐëʹÓà htm »òÕß html ×÷ΪÎļþÀ©Õ¹Ãû¡£
HTML Îļþ¿ÉÒÔͨ¹ý¼òµ¥µÄÎı¾±à¼Æ÷À´´´½¨¡£
×ö¸öʵÑéÈçºÎ£¿
µÚÒ»²½£ºÈç¹ûÄúʹÓà Windows£¬ÇëÆô¶¯¼Çʱ¾¡£
Èç¹ûÄúʹÓà Mac£¬ÇëÆô ......
1.<font>£º¿ØÖÆ×ÖÌåµÄ¸÷ÖÖÊôÐÔ
¸ñʽ£º<font size=? color=? face=?>ÎÄ×Ö</font>
size£º×ÖÌå´óС
color£º×ÖÌåÑÕÉ«
face£º×ÖÌåÃû³Æ£»Ë«»÷¿ØÖÆÃæ°åÖеÄ"×ÖÌå"£¬¿ÉÒԲ鿴¿ÉÒÔÒýÓõÄ×ÖÌåÃû³Æ
2.&l ......
1. ³¬Á´½ÓµÄͼƬȥµô±ß¿òµÄ·½·¨£º
ÔÚ Óï¾äÀï¼ÓÉÏ border=0
È磺<img border=0
src="sadf.jpg">
2.Êó±ê·ÅÉÏȥͼƬ±äÉ«µÄ·½·¨£º
Óõ½Á˱êÇ©µÄʼþ¹¦ÄÜ£¬µ÷Ó÷½·¨ÊÇ function="this.src='asdf.jpg'"
鍣 ......
Meta±êÇ©Ïê½â£¬ÔÚÍøÉÏתµÄ£¬Ï£Íû¶Ô´ó¼ÒÓÐÓÃ
¡¡¡¡ÒýÑÔ
¡¡¡¡ÄúµÄ¸öÈËÍøÕ¾¼´Ê¹×öµÃÔÙ¾«²Ê£¬ÔÚ“ºÆå«È纣”µÄÍøÂç¿Õ¼äÖУ¬Ò²ÈçÒ»Ò¶±âÖÛ²»Ò×ΪÈË·¢ÏÖ£¬ÈçºÎÍÆ¹ã
¸öÈËÍøÕ¾£¬ÈËÃÇÊ×ÏÈÏëµ½µÄ·½·¨ÎÞÍâºõÒÔϼ¸ÖÖ£º
¡¡¡¡¡ñ¡¡ÔÚËÑË÷ÒýÇæÖеǼ×Ô¼ºµÄ¸öÈËÍøÕ¾
¡¡¡¡¡ñ¡¡ÔÚÖªÃûÍøÕ¾¼ÓÈëÄã¸öÈËÍøÕ¾µÄÁ´½Ó
¡¡¡¡¡ñ¡¡ÔÚÂÛ̳ ......