论坛: 编程破解 标题: 这个程序为什么不行啊~~~~知道的请进 复制本贴地址    
作者: bailove [bailove]    论坛用户   登录
我想用asp把用户写的内容写到天下台txt的文件中。为什么不行啊
请高手请教
<html>
<head>
<title>在线投稿</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
<style>
  .rainbow{ behavior:url(js/rainbow.htc) } 
</style>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<h1 align="center"><font size="5"><span class='rainbow'>在线投稿</span></font></h1>
<form name="form1" method="post" action="zaixiantougao.asp" enctype="multipart/form-data">
  <p><span class='rainbow'>作者</span> 
    <input type="text" name="name" size="10">
  </p>
  <p> <span class='rainbow'>性别</span> 
    <select name="Gender">
      <option value="男">男</option>
      <option value="女">女</option>
    </select>
  </p>
  <p><span class='rainbow'>年龄</span> 
    <input type="text" name="Age" size="4">
  </p>
  <p><span class='rainbow'>电子信箱</span> 
    <input type="text" name="Email">
  </p>
  <p><span class='rainbow'>主题</span> 
    <input type="text" name="topic" size="50">
  </p>
  <p align="center"><span class='rainbow'>内容</span></p>
  <p align="center"> 
    <textarea name="contain" cols="100" rows="50"></textarea>
  </p>
  <p align="center"> 
    <input type="submit" name="Submit" value="提交">
    <input type="reset" name="Submit2" value="重来">
  </p>
  <p>&nbsp;</p>
</form>
<h1 align="left">&nbsp;</h1>

</body>
</html>
-----------------
<% Option Explicit %>
<HTML>
<head>
<title>在线投稿</title>
</head>
<body>
name:<% =Request.Form("name")%><br>
Genden:<% =Request.From("Gender")%><br>
Age:<% =Request.From("Age")%><br>
Email:<% =Request.From("Email")%><br>
topic:<% =Request.form("topic")%><br>
contain:<% =Request.From("contain")><br>
<p>
<%
Dim filesys,peoplefile
Set filesys =CreateObject("Scripting.FileSystemObject")
Set peoplefile =_
  filesys.OpenTextFile(_
"zaixiantougao.txt",_8,true)
peoplefile.WriteLine Request.From("name")
Peoplefile.WriteLine Request.From("Gender")
Peoplefile.WriteLine Request.From("Age")
Peoplefile.WriteLine Request.From("Email")
Peoplefile.WriteLine Request.From("topic")
Peoplefile.WriteLine Request.From("contain")
peoplefile.Close
%>
<h3>信息已经被保存,谢谢~</h3>
<a href="index.asp">sdf
</body>
</HTML>
------
我也有试过用E:\home\~meimei\ziaxiantougao.txt8
我文件是在那个目录下的
谢谢,(那个服务器支持ASP+Access2000,和 纯HTML 
但不能使用 “FSO 组件权限,也不支持 global.asa 文件!”


地主 发表时间: 11/08 19:58

回复: pcfan [pcfan]   论坛用户   登录
因为你没有FSO权限。写到文件TXT中是要FSO支持的。你没有权限当然不行啦!

B1层 发表时间: 11/09 13:13

回复: computer_w [computer_w]   论坛用户   登录
你是用的jsp吧

B2层 发表时间: 11/10 10:39

回复: bailove [bailove]   论坛用户   登录
是不是我把上面的JavaScript改为VbScript就可以了吗?
   我试试看!!~~

B3层 发表时间: 11/10 12:25

论坛: 编程破解

20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon

粤ICP备05087286号