hallo和hello的读音:用flash提交数据出现的问题。

来源:百度文库 编辑:高考问答 时间:2024/05/03 06:39:31
用flash提交数据出现的问题。
我做了一个课件,最后课件得出姓名、成绩、时间,用send提交到到服务器test.asp文件,但是test.asp保存到txt数据库后里面怎么只有时间和日期,flash提交的数据一个都没有?

显示通过练习给name1、fenshu、txt等赋值了。

flash提交数据如下: var my_send = new LoadVars();
my_send.sname = name1;
my_send.score = fenshu;
my_send.shijian = txt;
my_send.send ("http://127.0.0.1/test.asp";,"_self","post'" target="_blank" )

以下是test.asp的文件。

99我! <% set fsFilesys=CreateObject("Scripting.FileSystemObject")
'打开文本文件server.mappath("/")是返回服务器发行目录的真实路径,也就是比如说:c:\Inetpub\wwwroot这个路径,然后"/realchat/book/book.txt"就是相对于这个路径基础上的路径。 set myText=fsFilesys.OpenTextFile(Server.MapPath("/")&"/realchat/book/book.txt")
'把文本文件的所有内容读出,保存在Temp这个变量中。 Temp=myText.Readall
myText.Close dim sname, score, shijian
'读FLASH传递过来的数据
sname=request.form("sname")
score=request.form("score")
shijian=request.form("shijian")
'写入数据库

set myText=fsFilesys.CreateTextFile(Server.MapPath("/")&"/realchat/book/book.txt")
myText.WriteLine(sname)
myText.WriteLine(score)
myText.WriteLine(shijian)
myText.writeLine(Ttime)
myText.WriteLine(date)
myText.writeLine(Temp)
myText.Close
%>
<script Language="JavaScript">
document.write("<h1>恭喜!您的留言已顺利提交,请按<a href='disp.asp'>这里</a>查看")
</script>

以下是txt文件在服务器中的目录 realchat/book/book.txt
刚刚又测试了一下,数值是有的,但是中文数值成乱码了