|
'///////////////////////////////////////////////////// 'ͨ¹ýÄ£°åÉú³É¾²Ì¬Ò³ÃæÊ¾Àý '×÷Õߣºgriefforyou '/////////////////////////////////////////////////////
<!--Ä£¿éÎļþ(template.htm)--> <html> <head> <title>%TITLE%</title> </head> <body> %CONTENT% </body> </html>ÿ
<!--TestTemplate.asp--> <% Dim fso,f Dim strTitle,strContent,strOut '´´½¨Îļþϵͳ¶ÔÏó Set fso=Server.CreateObject("Scripting.FileSystemObject")
'´ò¿ªÍøÒ³Ä£°åÎļþ£¬¶Áȡģ°åÄÚÈÝ Set f=fso.OpenTextFile(Server.MapPath("Template.htm")) strOut=f.ReadAll f.close
strTitle="ÕâÊÇÉú³ÉµÄÍøÒ³±êÌâ" strContent="ÕâÊÇÉú³ÉµÄÍøÒ³ÄÚÈÝ"
'ÓÃÕæÊµÄÚÈÝÌæ»»Ä£°åÖеıê¼Ç strOut=Replace(strOut,"%TITLE%",strTitle) strOut=Replace(strOut,"%CONTENT%",strContent)
'´´½¨ÒªÉú³ÉµÄ¾²Ì¬Ò³ Set f=fso.CreateTextFile(Server.MapPath("New.htm"),true)
'дÈëÍøÒ³ÄÚÈÝ f.WriteLine strOut f.close
Response.Write "Éú³É¾²Ì¬Ò³³É¹¦£¡"
'ÊÍ·ÅÎļþϵͳ¶ÔÏó set f=Nothing set fso=Nothing %> 
|