asp生成写入文本文件

[ 2008-12-14 04:12:12 | Author: zhenhua ]
Font Size: Large | Medium | Small
log.

1.html
<form name="LoginForm" method="post" action="1.asp" style="margin-top:0px;">
姓名: <input name="xingming" type="text" class="input" style="width:100px;">
手机号码: <input name="shouji" type="text" class="input" style="width:100px;">
内容: <input name="liuyan" type="text" class="input" style="width:150px;">
<input type="image" src="images/submit.gif" >
</form>

1.asp
<%
dim xingming
dim shouji
dim liuyan
xingming=request("xingming")
shouji=request("shouji")
liuyan=request("liuyan")
'创建 FileSystemObject 对象实例
Set fso=Server.CreateObject("Scripting.FileSystemObject")
'创建一个文本文件并返回 TextStream对象
Set txtFile=fso.CreateTextFile(Server.MapPath(""&shouji&".txt"),True)
'对文件执行写操作
txtFile.WriteLine "姓名:"&xingming&""
txtFile.WriteLine "手机:"&shouji&""
txtFile.WriteLine "内容:"&liuyan&""
txtFile.Close
%>

Comments Feed Comments Feed: http://www.zhenhua.org/feed.asp?q=comment&id=635
UTF-8 Encoding Trackback URL: http://www.zhenhua.org/trackback.asp?id=635

There is no comment on this article.

If you feel this site you find this information helpful, please click on the donation, which is voluntary,Thank you.
Post Comment
Smilies
[arrow] [biggrin] [confused] [cool]
[cry] [eek] [evil] [exclaim]
[frown] [idea] [lol] [mad]
[mrgreen] [neutral] [question] [razz]
[redface] [rolleyes] [sad] [smile]
[surprised] [twisted] [wink]
Enable UBB Codes
Auto Convert URL
Show Smilies
Hidden Comment
Username:   Password:   Register Now?
Security Code * Please Enter the Security Code