请问ASP自动生成HTML静态页面问题(如果设置保存为UTF-8)??

如下代码怎么改?Dimfso,fDimstrTitle,strContent,strOutsetf=server.createobject("adodb.recordse... 如下代码怎么改?
Dim fso,f
Dim strTitle,strContent,strOut
set f=server.createobject("adodb.recordset")
f.open "select * from template where id=2",conn,1,3
name=f("name")
html=f("html")
strOut=f("template")

sysj=month(now())&"月"&day(now())&"日"&Hour(now())&"时"&Minute(now())&"分"

Set ads=Server.CreateObject("Adodb.Recordset")
SqlT="select top 10 id,title,url,se from aspliancom_ads where weizhi=0 and time>now() order by top desc,id"
ads.open SQLT,conn,1,1
numrow2=0
menuads=menuads&"<table width=970 border=0 align=center>"
menuads=menuads&"<tr><td height=20 width=60><b>特别推荐:</b></td><td height=20>"

if ads.EOF and ads.BOF then
menuads=menuads&"<td height=20 align=center>暂时没有内容</td>"
else
numRows=0
While (Not ads.EOF)
if ads("se")=1 then
menuads=menuads&" <img src=/images/01.gif> <a class=word href="&ads("url")&" target=_blank><font color='#0000ff'>"&ads("Title")&"</font></a>"
else
if ads("se")=2 then
menuads=menuads&" <img src=/images/01.gif> <a class=word href="&ads("url")&" target=_blank><font color='#ff0000'>"&ads("Title")&"</font></a>"
else
menuads=menuads&" <img src=/images/01.gif> <a class=word href="&ads("url")&" target=_blank>"&ads("Title")&"</a>"
end if
end if
numRows=numRows+1
ads.MoveNext
if (numRows mod 10 =0) Then
numrow2=numrow2+1
menuads=menuads&"</td></tr>"
end if
Wend
end if
ads.close
Set ads = Nothing
menuads=menuads&"</table>"
strOut=Replace(strOut,"<{{menuads}}>",menuads)



Copyright=Copyright&Powered
strOut=Replace(strOut,"<{{sysj}}>",sysj)
strOut=Replace(strOut,"<{{baidu}}>",baidu)
strOut=Replace(strOut,"<{{site}}>",site)
strOut=Replace(strOut,"<{{siteurl}}>",siteurl)
strOut=Replace(strOut,"<{{email}}>",email)
strOut=Replace(strOut,"<{{Copyright}}>",Copyright)
strOut=Replace(strOut,"<{{icp}}>",icp)
strOut=Replace(strOut,"<{{qq}}>",qq)
strOut=Replace(strOut,"<{{menuads}}>",menuads)
strOut=Replace(strOut,"<{{baidu}}>",baidu)
strOut=Replace(strOut,"<{{ads01}}>",ads01)
strOut=Replace(strOut,"<{{ads02}}>",ads02)
strOut=Replace(strOut,"<{{ads03}}>",ads03)
strOut=Replace(strOut,"<{{ads04}}>",ads04)
strOut=Replace(strOut,"<{{ads05}}>",ads05)
strOut=Replace(strOut,"<{{ads06}}>",ads06)
strOut=Replace(strOut,"<{{ads07}}>",ads07)
strOut=Replace(strOut,"<{{ads08}}>",ads08)
strOut=Replace(strOut,"<{{ads09}}>",ads09)
strOut=Replace(strOut,"<{{ads10}}>",ads10)

Set fso=Server.CreateObject("Scripting.FileSystemObject")
Set f=fso.CreateTextFile(Server.MapPath("../"&html&""),true)
f.WriteLine strOut
f.close
Response.Write "<li>生成"&name&"成功</A><br>"
set f=Nothing
请高手帮我处理一下,谢谢。
set fso=Nothing
展开
 我来答
九能学长
2011-04-25 · TA获得超过240个赞
知道小有建树答主
回答量:365
采纳率:0%
帮助的人:199万
展开全部
输出页的头部加上
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
追问
 
加了,没用,好像ADODB.Stream实现,但我不知道怎么修改
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式