6万
6
18万
管理员
<!--这个文件名a1.html,需要配合a2.asp来使用,这两个文件搭配放在同一目录下,运行后在当前目录生成test.txt文件,根据提交的字符串内容,来替换覆盖test.txt的内容。zxp--> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>htmlzxptest</title> </head> <body> <form name="input" action="a2.asp" method="get"> 提交字符zxpid: <input type="text" name="zxpid" value="zxp-mo-ren-zi-fu-chuan"> <input type="submit" value="提交"> </form> </body> </html>
<!--这个文件名a2.asp是用来接收a1.html提交过来的字符串,以覆盖方式写入当前目录下的test.txt,如果不需要前置字符拼接a1.html提交来的字符串,请把lehaha删除即可。zxp--> <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>aspzxptest</title> </head> <body> <% dim strzxpid strzxpid = Request.QueryString("zxpid") Set fso=Server.CreateObject("Scripting.FileSystemObject") Set fout=fso.CreateTextFile(server.mappath("test.txt")) fout.Write("lehaha"&strzxpid) Set fout=Nothing Set fso=Nothing %> ok! </body> </html>
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页