Transfer from http://goarer.xicp.net
When the FSO generates a static HTML file, the replacement template tag has always been a very troublesome problem. At least I think so, but also make a template, trouble! , I saw a way to solve this problem today.
Such as a normal index.asp page, and use the ASP code to call the content in the database, build a pagehtml.asp page, add a textarea domain, assume it as name = "body", adjust Index.asp in Textarea Come out, such as:
<% filename = "../ index.html" if Request ("body") <> "" "Scripting.FileSystemObject") set fout = fso.createtextfile (Server.MAppath ("& FileName & FileName & FileName & FileName & FileName & FileName & FileName & FileName & FileName & FileName & FileName & FileName & FileName & FileName & FileName & FileName & FileName "")) Fout.Write Request.form ("Body") fout.closset fout = not%>
Such index.html files are generated, and even the templates can be used, as long as the ASP files used in normal conditions can be read to the textarea, there is no problem yet! Of course, the premise is that the server should support FSO