打印

请大家帮忙看下这段asp的留言板代码,看有没有什么问题?

请大家帮忙看下这段asp的留言板代码,看有没有什么问题?

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>留言簿</title>
</head>

<body>
<p align="center"><img src="images/gbook.gif" alt="gbook.gif (12142 bytes)" WIDTH="374" HEIGHT="83">
<%
set fsFilesys=CreateObject("Scripting.FileSystemObject")
set myText=fsFilesys.OpenTextFile(Server.MapPath("/")&"/cnzzz/book.txt")
Tname=myText.ReadLine
%> </p>

<p align="center">[<font color="#00FFFF" size="4"><a href="book.asp">我要写留言</a></font>][<font color="#00FFFF"><a href="../index.asp">返回首页</a></font>]</p>

<table width="600">
<%
do while Tname <> "Line1"
Tphone=myText.ReadLine
Taddress=myText.ReadLine
Tjob=myText.ReadLine
Temail=myText.ReadLine

%>
<tr>
<td><hr>
</td>
</tr>
<tr>
<th colspan="2" align="left">姓   名:<% =Tname %><br>
性   别:<% =Tphone %><br>
E—mail:<a href="mailto:<% =Temail %>"><% =Taddress %></a><br>
主页URL:<a href="<% =Turl %>" target="_blank"><% =Tjob %></a><br>
来   自:<% =Temail %></th>
</tr>
<tr>
<th align="left" bgcolor="<% =colorbg %>"><font color="red">留   言:</font></th>
<th align="left" bgcolor="<% =colorbg %>"><%
Tcomments=myText.ReadLine
do while InStr(Tcomments,"#&@")=0
%>
<% =Tcomments %>
<br>
<%
Tcomments=myText.ReadLine
loop
Ttime=Mid(Tcomments,4)
Tdate=myText.ReadLine

%> </th>
</tr>
<tr>
<th colspan="2" align="left">时   间:<% =Ttime %> <br>
日   期:<% =Tdate %></th>
</tr>
<tr>
<td><br>
<%
tname=myText.ReadLine
loop
myText.Close
%> </td>
</tr>
</table>

<p><br>
<br>
</p>
</body>
</html>
到红色的部分,便发生错误提示?

[ Last edited by netland on 2004-11-17 at 14:51 ]

TOP

代码呢?

TOP