日期:2014-05-16 浏览次数:21150 次
<%
set fso=server.CreateObject("scripting.filesystemobject")
if request.querystring("action")="update" then
content=request.Form("content")
set ts=fso.OpenTextFile(server.MapPath("1.txt"),2)
ts.write content
ts.close
set ts=nothing
else
set ts=fso.OpenTextFile(server.MapPath("1.txt"))
content=ts.readall
ts.close
set ts=nothing
end if
set fso=nothing
%>
<form method="post" action="read.asp?action=update">
<textarea rows="10" cols="60" name="content"><%=content %></textarea><br />
<input type="submit" value="修改" />
</form>