asp后台程序生成前台页面的问题,给个思路
ywj99 2005-02-17 04:35:50 生成文件内容:
<!--#include file=globals.asp -->
<%
Set fso = server.CreateObject("scripting.filesystemobject")
Set f1 = fso.OpenTextFile(server.MapPath("index.htm"), 2, true) '打开要写入的静态页面
Set ts = fso.OpenTextFile(server.MapPath("index.asp"), 1) '打开模版程序页面
s = ts.ReadAll '读取程序页面内容
ts.Close
f1.Write(s) '写入htm文件里面(程序也写进去了,要得不是原先index.asp跑出来后的效果)
f1.Close
'response.write s
Set fso = Nothing
%>
怎样让生成后的index.htm与index.asp显示的效果一样?(也就是说吧index.asp里面的asp程序全部静态读取到index.htm中?)
求教个位高手~~~~~~~~~~