<%
function WriteToFile(FileName, Contents, Append)
on error resume next
if Append = true then
iMode = 8
else
iMode = 2
end if
set oFs = server.createobject("Scripting.FileSystemObject")
set oTextFile = oFs.OpenTextFile(FileName, iMode, True)
oTextFile.Write Contents
oTextFile.Close
set oTextFile = nothing
set oFS = nothing
end function
%>
<html>
<body>
<%
WriteToFile "C:\intels\Test1.txt", "中国水利水电出版社(www.waterpub.com.cn)——全国优秀出版社", True
WriteToFile "C:\intels\Test2.txt", "中国水利水电出版社(www.waterpub.com.cn)——全国优秀出版社", false
WriteToFile "C:\intels\Test1.txt", chr(13) & chr(10) & "随风起舞(www.intels.net)——时尚咨询的个人网站", true
WriteToFile "C:\intels\Test2.txt", chr(13) & chr(10) & "随风起舞(www.intels.net)——时尚咨询的个人网站", false
'Test1.txt contains:
' 中国水利水电出版社(www.waterpub.com.cn)——全国优秀出版社
' 随风起舞(www.intels.net)——时尚咨询的个人网站
'Test2.text contains:
' 随风起舞(www.intels.net)——时尚咨询的个人网站
%>
Write to File test is complete
</body></html>
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!