<%
str = "<%"&VBCrlf&"a=""a"""&VBCrlf&"b=""b"""&VBCrlf&"%"&chr(62)
'先设置要写入的内容,vbcrlf是换行,字符串中的>要转换成chr(62)
Set fso=Server.CreateObject("Scripting.FileSystemObject")
Set f=fso.CreateTextFile(Server.MapPath("1.asp"),true)
f.WriteLine str
f.close
set f=Nothing
set fso=Nothing
%>