编程论坛
注册
登录
编程论坛
→
ASP技术论坛
这段代码怎么修改
sofine888
发布于 2008-01-01 00:57, 663 次点击
已解决,还有下面的
[[italic] 本帖最后由 sofine888 于 2008-1-2 17:23 编辑 [/italic]]
4 回复
#2
sofine888
2008-01-01 02:41
还有下边这一段
<%
username=request("username")
qq=request("qq")
email=request("email")
ly=request("ly")
if username="" or qq="" or email="" or ly="" then response.redirect("input.asp?why=error")
line1="签名:<font color="green">"&username&"</font>"
line1=line1&string(5," ")
line1=line1&"QQ:<font color='green'>"&qq&"</font>"
line1=line1&string(5," ")
line1=line1&"E-mail:<font color='green'>"&email&"</font><br>"
ly=replace(ly,vbcrlf,"<br>")
line2="留言内容:"&ly&"<br>"
line3="时间:"&now()
on error resume next
set fso=server.createobject("scripting.filesystemobject")
application.lock
filepath=server.mappath("lyb.txt")
oldfilepath=server.mappath("oldlyb.txt")
fso.movefile filepath oldfilepath
set fin=fso.opentextfile(path,,true)
set fout=fso.createtextfile(filepath)
fout.writeline line1
fout.writeline line2
fout.writeline line3
fout.writeline "<hr width='50%'>"
fout.writeline fin.readall()
fin.close
fso.deletefile oldfilepath
application.unlock
response.redirect("display.asp")
%>
fso.opentextfile(path,8,true)是以追加的方式打开文本,那什么是以更新的方式打开
[[italic] 本帖最后由 sofine888 于 2008-1-1 04:23 编辑 [/italic]]
#3
sofine888
2008-01-01 02:42
还有
<html><head>
<meta http-equiv="refresh" content="3;url=display.asp">
</head>
<body>
<h2 align="center">留言簿</h2>
<hr>
<!--#includefile="lyb.txt"-->
</body></html>
#4
林中泉水
2008-01-02 10:50
sql="select * from arti where 文章列表='"&findstr&"'"中哪个是字段名,哪个是表名啊?
#5
sofine888
2008-01-02 14:27
回复 4# 的帖子
arti是表名,你不会连这个都不知道吧
文章列表是字段名
1