<%
fname="template.htm"
dim replaceweb(2)
replaceweb(0)="haha"
replaceweb(1)="模版生成静态页面"
replaceweb(2)="模版生成静态页面实例"
set fso=server.createobject("scripting.filesystemobject")
set file=fso.opentextfile(server.mappath(fname),1,True)
FSOFileRead = file.ReadAll
set file=nothing
for i=0 to 2
FSOFileRead=Replace(FSOFileRead,"$HTMLWEB["&i&"]",replaceweb(i))
next
Set outfile = fso.CreateTextFile(Server.Mappath("newweb.htm"))
outfile.Write FSOFileRead
outfile.close
Set outfile=nothing
Set fso=nothing
%>