高手問題,充滿了高難度哦.

chenlishu413 2003-10-20 10:23:35
<% buffer=true %>
<Html>
<Head>
<Title>關於文件系統的測試,用來網上編故事</Title>
</Head>
<Body valign=center>
<Form action="" method="post">
<Table border=1 cellpadding=1 cellspacing=1>
<tr>
<td>姓名:<input type=text name=name></td>
<td>地址:<input type=text name=address></td>
</tr>
<tr valign=top>
<td>編寫故事:</td>
<td><textarea name=story cols=22 rows=10></textarea></td>
</tr>
</Table>

<br>
<input type="submit" name="sub">
<input type="reset" name="res">

</form>
</Body>
</Html>


<%
name=Request.form("name")
address=Request.form("address")
story=Request.form("story")

totalstr=name & ":" & address & ":" & story

set fso=server.CreateObject("scripting.filesystemobject")
if fso.FileExists("d:\story.txt") then
set txt=fso.OpenTextFile("d:\story.txt",ForAppending,true)
else
set txt=fso.CreateTextFile("d:\story.txt")
set txt=fso.OpenTextFile("d:\story.txt",ForAppending,true)
end if

txt.writeline(totalstr)
txt.close
%>

...全文
26 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
chenlishu413 2003-10-20
  • 打赏
  • 举报
回复
好像對文件不能進行寫操作,我進行測試了.只要加上這段東東就有問題,幫忙看一看吧.
if fso.FileExists("d:\story.txt") then
set txt=fso.OpenTextFile("d:\story.txt",ForAppending,true)
else
set txt=fso.CreateTextFile("d:\story.txt")
set txt=fso.OpenTextFile("d:\story.txt",ForAppending,true)
end if
slippers3000 2003-10-20
  • 打赏
  • 举报
回复
什么问题?

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧