我是靠谱客的博主 超级眼睛,最近开发中收集的这篇文章主要介绍如何做一个文本书写器?,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

<%
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>

最后

以上就是超级眼睛为你收集整理的如何做一个文本书写器?的全部内容,希望文章能够帮你解决如何做一个文本书写器?所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(181)

评论列表共有 0 条评论

立即
投稿
返回
顶部